Android Question Custom Manifest File

iCAB

Well-Known Member
Licensed User
Longtime User
Hi All

is there a way to add a variable to the manifest file that can be replaced during compile time based on a directive or a declaration.

For example, I need a way to replace the API key below for different customers. it will be nice if we can automate this process based on the build configuration or package name

B4X:
AddApplicationText(
   <activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
  android:theme="@android:style/Theme.Translucent.NoTitleBar"
  android:exported="false"/>
    <meta-data android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="Axxxxxxxx"/> 
)
'************ Google Play Services Base (end) ************

Does anyone know of a solution?

Thank you
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
#if buildname1
AddApplicationText(
   <activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
  android:theme="@android:style/Theme.Translucent.NoTitleBar"
  android:exported="false"/>
    <meta-data android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="Axxxxxxxx"/>
)
#End If

???
 
Upvote 0
Top