What does the templateMergeStrategy
property mean in an Android resource?
e.g. in Google Maps API key file
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
AIza.......some...secret...key...
</string>
I would have expected a simple google (or duckduckgo) search to give me results, but unfortunately it only seems to give me Google Maps API questions.
Unfortunately the Android Developer Docs on "String Resources" are also lacking in that department.
How can I write character & in the strings. xml? In android studio, you can simply press Alt+Enter and it will convert for you.
A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings: String. XML resource that provides a single string.
From change log
Uses this to overwrite the instructions in the Google Maps template. Subsequent runs of the template always update the instructions with the user's current keystore credentials.
Also changed the Maps instructions to deep link into a Google developer console flow, which allows for easier key generation.
It means Android Studio template engine will preserve this line when a new Google Maps Activity is created, so you don't loose your key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With