Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android manifest file with properties from other property file

In general android manifest for my app that uses google map v2 looks something like this:

<manifest>
   ...       
   <application>
      ...
      <!-- Goolge API Key -->
      <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="XYZ...ZYX" />
      ...
   </application>
<manifest>

The question is, if it's possible to do something like this:

<manifest>
   ...       
   <application>
      ...
      <!-- Goolge API Key -->
      <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="@{my.google.api.key}" />
      ...
   </application>
<manifest>

and have my_local.property file in my project with line: my.google.api.key=XYZ...ZYX ?

like image 839
greendraco Avatar asked Jan 16 '14 10:01

greendraco


1 Answers

You can use string resources for this and manifest would be

android:value="@string/google_api_key"
like image 128
Alex Avatar answered Sep 24 '22 07:09

Alex