Online Book Reader

Home Category

Developing Android Applications with Adobe AIR [16]

By Root 2543 0
and should look similar to the following code. Note the required or optional annotation, and default, for each setting.

Here are the required tags:

// Last segment specifies the version of AIR required

com.veronique.MyApplication

// Universally unique identifier.

// Android converts ID to a package name by adding

// "air." to the beginning.

// Hyphens are converted to underscore

// and digits are preceded by a capital A.

MyApplication

// name used for the APK package file

1.0.0

// contains three integers, up to three digits each

// properties of initial appearance of the application

Main.swf

// root swf

false

// application takes over the whole screen if true

portrait

// portrait (default) or landscape

false

// true (default) or false

true

cpu

// cpu (default) or gpu

The following tags are optional. They are child nodes of the application tag:

Hello World

// or localized

English name

nom français

// name as it appears on device. Keep it short

1.0.0

// Displayed in installation dialog

English description

Description française

icons/36.png

icons/48.png

icons/72.png

false

// Update handled by user on double-click or automatic

false

// can be launched from link in a browser

// Add all permissions as children of manifest tag

android:name="android.hardware.touchscreen.multitouch"/>

android:name="android.intent.action.MAIN"/>

android:name=

"android.intent.category.LAUNCHER"/>

]]>

Setting Permissions


The Android security and privacy model requires permissions to access certain features such as GPS. When clicking the Install button, the user sees the list of permissions and can then make an educated decision to opt out if desired.

Use the permission tag in the application descriptor to list all the permissions needed, as shown in the code below. Permissions cannot be modified at runtime.

Just before installing an application, the Android Market displays the permissions required. Figure 4-1 shows that Queue Manager, an application for managing your Netflix queue, only requires the Internet permission.

WARNING

Before submitting your application, verify that you only include the permissions needed. Otherwise, you may filter out a group of users who will not see your application in their version of the Android Market.

To make network requests. Can be used for remote debugging

To write data to external storage, such as the SDCard

Read-only access of phone state. Used to mute AIR in case of incoming call

®Online Book Reader