I am developing an Android application showing a map.
I'm using a MapFragment in which I display my map. I obtained an API Key and added all the needed permissions to my manifest.
So far so good, everything works fine when debugging the app on my HTC One S on Android 4.1.2 the map shows including controls and everything else.
When I debug the same application on my Galaxy S4 running Android 4.2.2, the map stays blank and only controls show.
Internet connection is definitely available.
The "error message" I get on the Galaxy S4 is "Failed to load map. Could not contact google services."
Here is my manifest:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.mypackage.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<permission
android:name="com.mypackage.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="myobtainedkey" />
Again: Everything works fine on my HTC One S, I'm looking for the reason why the map is not loading on the S4?
Things I already tried:
Note that the Maps Embed API, Maps SDK for Android, and Maps SDK for iOS currently have no usage limits and are at no charge (usage of the API or SDKs is not applied against your $200 monthly credit).
Mapbox is probably the most popular Google Maps API alternative developers and businesses use. They have been in business since 2010 and started as a free map data and analysis service for non-profit organizations. Today, they provide map tools and data to players like Facebook, Lonely Planet, and Foursquare.
Try installing/updating google services on your Galaxy S4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With