I am working in Iran, I had used Google map v1 for long time, now that I have to use Google map v2, I just can see a grey blank page with zoom icon only, I have done every thing based on Google instructions, I think I have done everything.
*I WANT TO KNOW IF THIS PROBLEM IS RELATED TO GOOGLE POLICY THAT MEANS SOME COUNTRIES ARE NOT ALLOWED TO USE GOOGLE PLAY SERVICES AND MAP .... *
THIS IS A BIG PROBLEM FOR ME NOW
THX
this is the manifest file of my code :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pea.map001v2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="17" />
<permission
android:name="your.package.name.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="your.package.name.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.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.pea.map001v2.MainMapActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCk0HwJYHIjM9W_eqqTB1C5wyB-2B0B5U4" />
</application>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
</manifest>
You Must Run your app in amulator having Following Configuration....
Google API(x86 System image)
Select checkBox indicating "Use Host GPU..."
If anything this could be related to Iran's policy and not Google's.
The problem you describe usually happens when you have a problem with the API key you have generated or the way you registered it in the Console.
You can go over this blog post I wrote on getting the Google API V2 key:
Google Map API V2 key
Maybe, you missed one of this:
Didn't include the Google API Key v2 in the manifest.xml
Didn't add the package name in Android maps Key(Console) , example:
ABczzisierkaiSAisi-Ka2;my.project.package
Didn't add Internet Permissions, on manifest.xml.
Your Android device doesn't have an internet connection
NOTE: If you are using a Virtual Device, it won't work, beacuase it needs Google Play Services
I used to face the same problem as yours. The first thing you need to check is Google Maps Android API Key. Then check the settings in AndroidManifest.xml. There are detail instructions in following link: Android Maps Android v2
yes, it's because of country ._.
i have this issue too on javaScript apis, but it works out with proxy..
Related
I am working on a project which has google map configuration and view.
But i can't see google map on the activity. The map has been loaded but not showing the details. Please see the image give.
See there is Google logo in left bottom corner. but still not showing the map on screen.
Following is Menifest.xml
<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="key------" />
<permission
android:name="com.roadyo.passenger.googlemapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.MAPS_RECIEVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
Please check your api key.
Follow this link to generate api key for google maps
Google map console
Here is a simple example of how to use maps in our app, it gives step by step implementation of it, including registering app foe google APIs...
http://javapapers.com/android/android-show-current-location-on-map-using-google-maps-api/
Check your Sha1 and package name used to generate the api key. I have also got this error when i checked it its beacause of the mistake in package name and i regenerated the key by changing the package and i got it correctly
I have published my first application (Voice To SMS) on google play 4 days ago and I still can't find my app in search by it's name or developer name. I can find my app only by package name or by real app name but without spaces - "VoiceToSMS".
Link to my app: https://play.google.com/store/apps/details?id=com.SpeechProcessing.Voice.To.SMS.Converter&hl=en
As we can see, in the bottom of the page there is no even "Similar apps" section...
In Google Play developer console everything seems OK (except that my app is not designed for tablets). 0 errors, I selected all available countries for distribution, app status is "Published". In app description I wrote some keywords.
What could be wrong? Maybe app is not indexed because its name is not specific?
I am attaching manifest.xml additionally:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.SpeechProcessing.Voice.To.SMS.Converter"
android:versionCode="2"
android:versionName="1.0.1" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<activity
android:name="com.SpeechProcessing.Voice.To.SMS.Converter.MainActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
</application>
</manifest>
Well, more than 2 weeks gone after uploading my app on Google Play. My app is finally searchable by term "voice to sms". In my strong opinion, it wasn't Google-side issue that app wasn't searchable for a while by mentioned term.
I did one SEO trick - in app description I included some keywords whose are popular but not so like "voice to sms". In result, I got more downloads and growing my app's search rank. After few days, my app's rank was enough high that Google could show my app in results of "voice to sms" search term.
So, if you have similar problems - focus on SEO for your app.
Google maps background is not displaying in my device/emulator.
First i created
1. Certificate fingerprint MD5 (SHA1).
2. API Console
under services- Google Maps Android API v2 and Places API is activated
3.I got the API key, i placed api key in my layout file.
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:apiKey="Api key from google"
android:clickable="true" />
Manifest file
...
the maps look like this.
The Map image on a emulator. (Evernote note shared link not spam)
To use google Map Service,
Please visit code.google.com and get you ApiKey.
create a project there->go to services->Activate the Google Maps Android API v2. Then Create Key for your application.
Add the following permissions to your manifest.
uses-permission android:name="com.anchit.locationapi.maps.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" />
Use
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_apikey" />
also add following in your application tag in manifest
android:name="com.anchit.locationapi.maps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
If you are using Google Map V2, then your xml declaration is wrong.
New Google api need below code:
Google Map apiV1 is deprecated and you cant create new key for map api V1, only older exisiting keys are working not newer one. So try with this new things.
I have implemented Google Map V2 in my application, Everything works just fine.
Checked on 2-3 mobiles and tabs it runs perfectly,
But it runs for 10 to 15 times a day on single device.,after that it does not load map on same device and gives following error.
05-06 07:17:41.866: E/Google Maps Android API(17217): Failed to load map. Could not contact Google servers.
In short, sometimes it displays map and sometimes it does not.
I m using map key generated from android debug key.
Please suggest some solutions for this.
My Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ocatalog.mapdemo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<permission
android:name="com.ocatalog.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.ocatalog.mapdemo.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<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-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyA9E-oCIM2d5rlhxnsJf66Bly57JXpkiKI" />
<activity
android:name="com.ocatalog.mapdemo.MapDemoActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I am experiencing the same problem, the maps are running OK on multiple devices, but randomly show a blank screen, sometimes for days.
When I debug the code I can see that all actions like adding markers, overlays, etc. are executed properly.
Also, no idea if this is related, but the Geocoder seems to be working correctly in the meanwhile, so it is definitely not related to an Google Services connectivity issue(or is it?).
Besides, the map also works fine offline and the cache data is stored properly (well, most of the time that is).
Clearing my app's cache and data also doesn't help. Nor does doing so for the Google Services app.
However, reinstalling the application seems to fix it for most of the time, but does not prevent it from reoccurring.
Add the following permission in your manifest file
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
There are Google Maps API v2 and Google Maps Android API v2.
You should use Google Maps Android API v2.
I've made an app that determines the location (balloon) and shows it on Google Maps (with roads, city etc) so an active internet is needed.
This works fine when I'm using WiFi but not on 3G. It determines the location and the location-output tot Google Maps is allright (including a balloon) but the Maps (with road, rivers, city etc) will not update.
Hereby my manifest-settings:
<uses-library android:name="com.google.android.maps" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
I solved the problem myself but here's how:
After reading several articles on the net it seems some kind of api key error.
I read there's a difference in debug-key and signed key so I replaced the debug key with the signed api key and that did the trick.
Why wifi worked and 3G not it's not clear te me and really I don't mind because it all works fine now