Developing Android Applications with Adobe AIR [17]
Access the location information. Fine for GPS location, Coarse for Cell/Wi-Fi
Access the device camera
Access the device microphone
Prevents device from dimming, going in sleep mode and activating keyguard
Access information on device network interfaces
Access information on device Wi-Fi networks
Android offers a lot of other settings, only some of which can be set in AIR but not documented. They should all be added to the Android→Manifest Additions→Manifest node.
Figure 4-1. The Queue Manager application before installation
The Android Launcher activity keeps track of the applications that have been launched. If a long press is applied on the home button, a list of recently run applications appears. If you do not want your application to be on this list, add excludeFromRecents to your manifest file as follows:
]]>
Applications are installed on the device memory by default. If you select Settings→Applications→Manage Applications, you will notice that some applications have the option “Move to SD card” (which then becomes “Move to phone”).
However, some Android applications and AIR applications do not have that option. If you type the following at the command line, all applications will now be moved:
adb shell pm setInstallLocation 2
To restore the settings, type the following:
adb shell pm setInstallLocation 0
If you set the installLocation tag to preferExternal, saving internally is not an option. All of your content, including your application, is stored on the SD card. This could be helpful for large applications. Keep in mind that the content is accessible to other applications, and therefore is vulnerable. If the SD card is full, the system falls back to an installation on the device:
Read the Android recommendation regarding what should not be installed externally, online at http://developer.android.com/guide/appendix/install-location.html.
Users can erase the application data. If you want to prevent them from doing this, you can add the allowClearUserData attribute to the android node:
WARNING
At the time of this writing, a bug in Android prevented this setting from working. It should be fixed in a future release.
You can also fine-tune permissions to add specific requirements. For instance, you may have an application which only works for devices with a camera auto-focus. You can add a different type of permission, uses-feature, to inform users of what is needed for your application:
Android throws an error if a required permission is not set, such as for Internet or GPS, but not others, such as reading the phone state or disabling the keyguard. The criterion is what it considered potentially dangerous for the user. In AIR, the application always fails silently.
Native developers have a larger choice of features, and therefore permissions. You can go to http://developer.android.com/reference/android/Manifest.permission.html