Question

I read through various blogs stating the Google Maps in Android supports from API Version 13. My app requires google maps to be displayed. I want to make a configuration such that if the Android SDK version of the phone is 13 and above, it should display the maps. If it is lesser, then the maps should not be displayed.

I cannot find any good answers for this problem. Pls help.

Was it helpful?

Solution

Here's how you can check for version number:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
    // Your code to show maps
}
else {
    // Do something else
}

OTHER TIPS

The Google Maps Android API supports SDK8+ (Froyo) with SupportMapFragment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top