Add changable value to meta data tag in androidManifest.xml

hi so
i added this https://github.com/mit-cml/appinventor-sources/pull/2191
to my project i really liked it but what if i want to add a changable value ? like app ID to meta data ? so whatever i write in property transfers to meta data
how to do it ? is it possible ?

Please be patient, you already created an issue and responded to the pull request. But to answer your question. This pull request adds the ability to add meta-data elements to the AndroidManifest.xml. You can read out these values by having something like the following:

ApplicationInfo applicationInfo = container.$context().getPackageManager().getApplicationInfo(container.$context().getPackageName(), PackageManager.GET_META_DATA);
String myApiKey = applicationInfo.metaData.getString("my_api_key");

This works fine if you added data using the @UsesApplicationMetadata annotation. But to get data from the current activity you would need to get the activity information instead of the application information. To do this you would need to do something like the following:

ActivityInfo activityInfo = container.$context().getPackageManager().getActivityInfo(container.$form().getComponentName(), PackageManager.GET_META_DATA);
String myApiKey = activityInfo.metaData.getString("my_api_key");

Now, going back to your question. You are asking if it is possible to change the value of the meta-data elements in the AndroidManifest.xml. To my knowledge, this isn’t possible. What would be your use case for this functionality? I don’t see why using variable wouldn’t work just fine.

for example google requires you to add this meta data to your app*>

meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

and this value changes from APP to another
i want to create a property in the builder or in the extension and whatever write there becomes in the meta data value
hope you understand for what i would use that

This kind of functionality can't be achieved using an extension. For this to work the Compiler would need to be altered. A conditional needs to be added, similar to the condition for the NearField component specified here. If this condition evaluates to true you add the meta-data tag, including the APPLICATION_ID specified in the property.