Blank map in my device - google maps api - android

Im having this problem since hours , i just did everything right, in the dev console i put the sha1 correctly , the package name and everything is enabled
now im getting this in my phone
but in my emualtor is working...
i thested it in 2 devices, all google play is updated, all permisions are granted in the android manifest
<permission
android:name="com.example.usuario.googlemapstest.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.usuario.googlemapstest.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<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"/>
Reference in android manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
in the values folder is my key
i really dont know why this happends... any idea?

Related

android- google map stop working

I've used google maps in my application since 8 month ago . I'm using eclipse. It works nice and every thing was ok. Now I find out that maps are not showing anymore , it shows the google icon and zoom icons too but it doesn't show the maps .
I went to new google developer console . https://console.developers.google.com and I enabled Google Maps Android API on the console , then I went to "credential" and regenerate a new key .
I change some codes in manifest , this is my manifest code :
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<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.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<permission
android:name="myapplication.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="ir.persiandesigners.jazebehayeiran2.MAPS_RECEIVE" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<!-- end map -->
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/CustomActionBarTheme" >
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="myApiKey" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
I export the app and installed it again but it doesn't work yet .
what should I do ? Why it is not working ?
by the way ,I'm having google play service lib verion 4.3.23 in the eclipse and I'm sure that I've installed google play service on my phone .
thanks
When you export the app did you use another key other than debug.keystore. Then you should generate the SHA1 key with the keystore file you used to export the app.
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="your_API_key"/>
<meta-data android:name="com.google.android.gms.version"
android:value="google_play_services_system_key"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
"google_play_services_system_key" this will you get in your error when you run your code. this is your system key put that here.
Try to Open your SDK manager and Update the Google Play Services and Google Repository.

Google map not loading Android

Though I know this has been a persistent and addressed issue, everyone's problem seems to be solved a different way every time. I have been trying to get my map to show all day but to no avail. I had a project which had a map in it, so what I migrated that project to another location and set up Google Play Services in that project. I got everything to work except for the map to show. I have the library as i am able to use LatLng but the map always fails to load. I have generated new keys, deleted and re added the key, and deleted and re added the debug keystore. I have also updated the api console to ensure everything lined up but my map still doesnt show. I have Google Map for Android Api enabled in the console. And my package name is correct also. I have ran a clean rebuild and uninstalled the app to see if it works but it still doesnt load.
NOTE: I have also tried using SupportMapFragment instead.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wallfly"
android:largeHeap="true">
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Actionbarstyle">
<activity
android:name="com.android.wallfly.MyActivity"
android:label="#string/app_name" >
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="(Actual API Key)" />
</application>
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<permission
android:name="com.android.wallfly.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.android.wallfly.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<!-- these grant the app the ability to access location. coarse is wifi and cellular, fine is gps -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
I have added an image to show that my package name lines up. Also i copied and pasted the SHA1 fingerprint so I am sure that it does line up also.
For those who may face a similar problem, my google play service was outdated. So I had to change the build.gradle the current version of google play service.

Titanium SDK: The Google Play services resources were not found

I'm currently working on getting an old Titanium SDK 1.x app working in the modern era on Titanium SDK 3.1.2.
One of the challenges I've managed to find myself stuck on is after upgrading from Google Android Maps API v1 to v2 I'm consistently getting this error:
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
I have installed in the ADK the 18.0.1 build tools as well as the required Google Play Services extras package. Uninstalling/reinstalling does nothing useful, and as far as I can tell there's no way to manually include the Play Store Services library in Titanium.
For reference I followed the instructions here to set up the Maps API v2 in the app. The following is what is in my tiapp.xml file (I replaced the actual package names):
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="com.example.permission.MAPS_RECEIVE"/>
<permission android:name="com.example.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<application>
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="###"/>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10"/>
</application>
Note that the correct certificates and correct API have been used within the Google API Console.
Does anyone have any idea why I might be unable to load the Google Play Services in my Titanium app?
Thanks in advance!
The maps only work on device. Are you running this in the emulator?
I have an additional permission set "android.permission.ACCESS_NETWORK_STATE"
Also double check to ensure your appId is correct and matches what is in your tiapp.xml file
<android xmlns:android="http://schemas.android.com/apk/res/android">
<tool-api-level>14</tool-api-level>
<manifest>
<!-- uses-sdk android:minSdkVersion="11" android:targetSdkVersion="14" -->
<!-- Camera Access -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<!-- Allows the API to download data from Google Map servers -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- Allows the API to cache data -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Use GPS for device location -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- Use Wi-Fi or mobile connection for device location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!-- Allows the API to access Google web-based services -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- Specify OpenGL ES 2.0 as a requirement -->
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<!-- Replace <com.domain.appid> with your application ID -->
<uses-permission android:name="com.wiley.TIgram.permission.MAPS_RECEIVE"/>
<permission android:name="com.wiley.TIgram.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<application android:hardwareAccelerated="true" android:theme="#android:style/Theme.Holo.Light">
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="XXXXXXXXXXXXXXXXXXXXXXXX"/>
<activity android:configChanges="keyboardHidden|orientation" android:name="ti.modules.titanium.media.TiCameraActivity" android:screenOrientation="landscape" android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
</application>
</manifest>
</android>
This is more of a suggestion than an answer but I got the same error and it made me bark up the wrong tree for quite some time before I realized I had an error somewhere else in the code. In my case, there was a view element that had a null attribute, though that wasn't clear from the stack trace. The Play Services error you pasted above was visible early on but it seems that the compiler will ignore it if the service is found.
:(
To make matters more confusing, I built the same code for iOS and there was no error.

Google Map V2 android Emulator

I used google map v2 in my android application, i created my api key in the google console.
But always i have this result in the emulator :
someone help me please ?
First make sure you have internet access with your simulator.
Then make sure you have the following in your manifest:
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="YOUR_API_KEY"/>
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
And opengl2:
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
DOC HERE
If this is still not ok, then try to use GENYMOTION emulator (with google apps).
Hope this will help you.

Manifest permission section stopped the project

I had vital problem when I am working on my new Android App as when I testing it the traditional message " the project stopped ..." although when I was testing the app on emulator it worked well , I checked my code and I reached to problem place and it was on manifest on these lines of code :
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />-->
but I didn't solve this issue .

Categories

Resources