My application uses a large number of MapView screens and I'm trying to figure out how to manage the API key between the debug environment and production. Apparently, there is no way to change the debug application key in Eclipse so I must use a debug map API key in that environment. Conversely, there is no way to export a package for beta testing without a production application key so I must change the map API key in every view in order to create a working package.
My first idea was to do this:
All MapView.xml files have this:
android:apiKey="@string/googleMapsAPIKey"
And then in strings.xml I put this:
@string/debugGoogleMapsAPIKey TheMagicKeyString
If this worked, it would allow me to change a single line in strings.xml and all the MapViews would get updated in the rebuild. But it didn't work. I guess strings.xml can't make references into itself. Any other ideas?
Thanks