On Fri, Apr 9, 2010 at 5:20 PM, Tom Opgenorth <[email protected]> wrote:
> Is there a better way to manage this? Sure. First determine which key you need based on the "debuggable" attribute in your manifest file, which you can check dynamically via an ApplicationInfo, which you can get via the PackageManager: http://developer.android.com/intl/de/reference/android/content/pm/ApplicationInfo.html#FLAG_DEBUGGABLE String key = isDebug() ? DEBUG_KEY : RELEASE_KEY; Then use the map view constructor that takes the API key to pass it dynamically instead of specifying it in the layout (this means you also have to add it to the main layout programmatically). mMapView = new MapView(this, key); // Add map view to layout ... Just remember to change that debuggable attribute, which you should be doing before release, and you should be golden. ------------------------------------------------------------------------------------------------- TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

