android - Is it possible to use conditions at xml files? -
possible duplicate:
android: automatically choose debug/release maps api key?
i use mapview in application, have use different api keys google maps. key defined in xml file (android:apikey). there way use conditions there - so, if file generated testing (debug mode), test key used; if release file, release key used.
you create mapview on activity create , set api key there based on if in debug or not. add main view group.
the api key has passed in constructor
mapview mymap = new mapview(this, apikey); viewgroup.addview(mymap);
Comments
Post a Comment