Reputation: 19956
my app is internationalization,so in some country have Fortress mobile phone,which is not have google Mapview,it not use mapactivity,so i cannot install my app to the Fortress mobile phone. so myquestion:
if i can add common map.jar to my app,so i can use the jar to finish my app map effect ,not care mapview in the Fortress mobile phone .i donot know if the seem common map.jar is exist at present
if have other methods to meet my need?
Upvotes: 0
Views: 78
Reputation: 13458
If I understand the question correctly, you want to determine, at runtime, whether GOogle Maps exists on the device, and take an alternative path if it does not.
<uses-library android:name="com.google.android.maps" android:required="false" />
try {
mContext.getClassLoader().loadClass("com.google.android.maps.MapView"); // You have Google Maps } catch (ClassNotFoundException e) { // No Google Maps }
Upvotes: 1