Closed Abdelsattar closed 3 years ago
This plugin only exposes your keys through the AndroidManifest and through your BuildConfig so you won't be able to use the plugin in this way. One of the intentions of this plugin is to avoid putting your API key in string resources since those are readable by other apps via PackageManager. Curious why you choose this approach?
@arriolac I think it'll be more convenient if the values added to the resources using resValue
, so the values can be used inside XML files easily.
My case is I want to use Admob units ids inside layouts.
It is a deliberate design decision to not inject keys to string resources as those values are accessible by any app. See PackageManager.getResourcesForApplication(String).
I'm trying with google maps API key as following
in AndroidManifest.xml
<meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/google_maps_key" />
and in google_maps_api.xml
`
`
I tried to like this and as well like
${GoogleMapsAPIKey}
andGoogleMapsAPIKey
but always have the same error Ensure that the following Android Key exists: API Key:${*.*.*.BuildConfig.GoogleMapsAPIKey}
and it works fine if I put it in the value in AndroidManifest how to solve this?