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.
- Why is that the case?
- Is there any difference between android 4.1 and 4.2 concerning the v2 Map API?
- Is there any difference between Samsung and HTC concerning the issue?
- Do I need a new key for some devices?
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:
- uninstall the app and reinstall it again
- update / reinstall google play services
- use wifi only / use data connection only
- restart the device
- clean the project