Frage

I'm updating my app with google maps v2. I've got it working on my newer devices, but i am confused as to how and if i can get it working on my older ones.

Case in point: HTC Legend running 2.2, with the google play app installed.

If i run my app on that device and try the googleplayservicesutl.isgoogleplayservicesavailable i get SERVICE_INVALID. and getMap() in the fragment returns null. (i am calling it from onresume now just to test)

Going by Google's description on requirements here: https://developers.google.com/maps/documentation/android/start

,there's lots of help, but the only info regarding target phones is that they need Open GL ES 2, nothing on other requirements.

There are lots of threads on the subject here on StackOverflow, but mostly all are about problems relating to how to get maps v2 into your app. I have gone through the motions regarding those problems with i've now solved, as i've said it runs fine on my HTC One and S3.

My hope initially was that i could get maps v2 to run in my app on any 2.2 device with Open GL ES v2 by including required support libraries. I.e. include the google play services and maps dependencies in the app deploy.

Am i mistaken?

Pointers much apprciated.

War es hilfreich?

Lösung

In order to run Google Maps API V2 on the device, it should have google-play-services installed on it.

Go the the settings -> applications and make sure you have this installed (the version may be different).

enter image description here

Andere Tipps

Google Maps API v2 for Android are included in Google Play Services. Without their, that API will not run properly. It also requires Open GL ES 2, you're true ...

https://developers.google.com/maps/documentation/android/intro?hl=en

That method will return Google Play Services License, if their are installed. Other time it will return null .

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top