Configuring Android

On Android further configuration of Android Manifest XML file is needed for specific components. When first compiling for an Android platform Delphi will create a new AndroidManifest.template.xml file. This is the file you should edit; the code should be added into the application tag.

 

  • AdMob

Select AdMob Service within Project Option’s entitlements list.

 

  • App Flood

Add appflood.jar file to the Libraries section of the Project Manager (under Target Platforms then Android). The following should be added to the manifest file:

<activity android:name="com.appflood.AFFullScreenActivity"
  android:configChanges="keyboardHidden|orientation"
  android:theme="@android:style/Theme.Translucent"
  android:launchMode="singleTask" />
<receiver android:name="com.appflood.AFReferralReceiver"
  android:exported="true" >
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>
  • Chart Boost

Add chartboost.jar file to the Libraries section of the Project Manager (under Target Platforms then Android). The following should be added to the manifest file:

<activity android:name="com.chartboost.sdk.CBImpressionActivity"
  android:theme="@android:style/Theme.Translucent.NoTitleBar"
  android:excludeFromRecents="true" />

 

  • RevMob

Add revmob.jar and jve-revmob.jar files to the Libraries section of the Project Manager (under Target Platforms then Android). The following should be added to the manifest file:

<activity android:name="com.revmob.FullscreenActivity"
  android:theme="@android:style/Theme.Translucent"
  android:configChanges="keyboardHidden|orientation" />

 

  • Push Notifications

Select Push Notifications within Project Option’s entitlements list. Make sure lines like the following are added to the resulting manifest file:

<meta-data android:name=
  "com.google.android.gms.version" android:value="4323000" />
<service android:name=
  "com.embarcadero.gcm.notifications.GCMIntentService" />

 

  • Permissions

Various components might require the following permissions to be selected within the Uses Permissions list of the Project Options:

  • Access network state
  • Access Wi-Fi state
  • Get accounts
  • Internet
  • Read external storage
  • Read phone state
  • Read user dictionary
  • Vending billing
  • Wake lock
  • Write external storage