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.


  • Chart Boost

Add chartboost.jar and jve-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" />
  • Facebook’s Audience Network

To use Audience Network on Android you need to perform the following three steps:

1. Add audience-network.jar file to the Libraries section of the Project Manager (under Target Platforms then Android).

2. Add audience_network.dex file to Project → Deployment, to be deployed within the assets folder (your deployment record should look something like in the picture).

3. The following should be added to the manifest file:

<activity android:name="com.facebook.ads.AudienceNetworkActivity"
  android:configChanges="keyboardHidden|orientation|screenSize"
  android:excludeFromRecents="true" android:hardwareAccelerated="true"
  android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
  • Push Notifications

Select Push Notifications within Project Option’s entitlements list and enter all the data within the Services tab.

  • 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