You can now receive incoming SMS messages (text messages) on Android devices, using the sms-receive plugin.
It does not intercept them – the messages still go to the Messages app. It only works if your app is compiled under PhoneGap.
Your app doesn’t have to be in the foreground – it will received the messages so long as it has been started. The received message is available as variable in your app – so you can use it to update databases, inform the user or all kinds of things.
Full details are in this Tech Note:
Due to changes in Android OS, this post is deprecated starting with AppStudio 6.
Splash screen support for Android Home screen apps was added in Chrome 47, released in December 2015. It gives your web apps a look much more like a native app at startup.
There are a few new items in Project Properties for this. They are grouped together under the ‘WebApp Chrome’ heading.
Continue reading “Android Web Apps: SplashScreens and Icons”
Chrome 28 and higher now supports setting the orientation in your app. Simply do the following:
The screen will then shift to the orientation you specify and ignore the actual orientation of the device.
This only works on Chrome. If you try to execute this code on an iPhone, it will get an error and the orientation will not be affected. To improve the code above so it runs without errors, do the following:
If screen.orientation <> undefined Then
The screen orientation still won’t change on an iPhone, but at least there won’t be an error!
AppStudio 4 makes it much easier to use the camera from your device. Before, there was a complex chain of events which had to be managed, and a bug in iOS made things difficult.
Let’s walk through a simple app. Here is how it looks:
Continue reading “AppStudio 4: Using the Camera”
Google recently added a little trick to Chrome, allowing apps to become full screen. It works on both the Desktop and Android devices. You’ll need to be running Chrome Version 32 or newer.
To use it, add a button to your app with the following code:
As of Chrome 32, this is no longer needed.
After going to full screen, a message is displayed telling how to go back: swipe down on an Android device or hit escape on the desktop.
Here’s how it looks on an Android device.
If you want to execute some code after the resize (perhaps to move controls to take advantage of the larger screen, do the following:
'… do any housekeeping
If you want hide the button if you are not using Chrome, add this code to your global code:
If Not window.chrome Then btnChrome.hide()
A few gotchas:
- This won’t work with the Android Browser or iOS.
- This won’t work with PhoneGap, as long as it still uses the Android Browser.
- It seems to have to be done from a button: just putting it in Global Code does not work.
Let us know if you find out anything more about this trick!
There has been some confusion in the Android world lately due to the two different browsers on Android devices. Some devices run one, some the other and some run both. Here’s a rundown on what we know about them and how they differ.
Continue reading “Android Browser and Chrome”
We had an interesting support question today. Is it possible to install an app created with AppStudio on an Android device without an internet connection?
We got to work to see if there was a way. We found two methods:
Continue reading “Can AppStudio apps be installed on Android without the net?”
Want a quick way to get an App Studio app compiled with PhoneGap onto your Android device? Use Dropbox!
- Build your app using PhoneGap as always.
- Put the resulting .apk file into your DropBox. (Get an account if you don’t already have one – it’s free!)
- Install the Dropbox app on your Android device if you have not done so already.
- Open Dropbox on the device and click on your .apk file. It will install!
(If you have not used Dropbox yet, it’s a great tool. It puts what looks like an ordinary folder on your PC or Mac desktop. You can share it with other users and computers: add a file to your Dropbox and your other computers can use it right away. There’s lots more, but this already is the simplest network share you have ever experienced. Installation is also very simple.)
PhoneGap has announced that Version 1.0 is now available. The release puts the focus on accessing native device APIs, which is new ground for the web. Other improvements include:
* Overall API stability and “pluggable” architecture
* W3C DAP API compatibility
* Contacts API
* Remote debugging tools
Today’s release also includes a new unifying bridge interface that makes adding platforms and platform extensions easy. Plus, developers will be pleased to see that the plugin development process has been simplified.
PhoneGap lets NS Basic/App Studio users package their apps for iOS, Android and other app stores. It also gives them additional API functions.
The easiest way to make use of PhoneGap is with PhoneGap Build. There is also a tutorial on using PhoneGap Build.
Here are some other NS Basic + PhoneGap resources:
The most important feature of NS Basic/App Studio 1.1 is support for PhoneGap.
PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. It takes your NS Basic/App Studio app and packages it so that it is acceptable for Apple’s App Store, Google’s Marketplace and other platforms.
It also provides additional API functions not found in NS Basic/App Studio.
Depending on platform, these can include:
- System Information
PhoneGap is free.
Here are a couple of tutorials to help you get started.
Distributing apps using PhoneGap is much more complex than webapps. Android/PhoneGap has a complex installation procedure. While iOS is easier to get going, the 4+ gigabyte download and the complications of the App Store make it at least as complex an undertaking.