Вопрос

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.

Это было полезно?

Решение

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
}

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top