Google map on android only shows grid. - java

I have a problem where my map activity only shows the grid and is not downloading map tiles.
What I've checked:
I have the api key that I got from here.
I've added the reference to my android manifest.
My device has internet (and google maps works on the device).
In LogCat I am getting the following messages from MapActivity
07-28 20:25:19.271: INFO/MapActivity(550): Handling network change notification:CONNECTED
07-28 20:25:19.271: ERROR/MapActivity(550): Couldn't get connection factory client
What am I missing? How can check to see that my key is the problem?

You have to add a Debug key:
http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint
That's indeed really annoying as you have 2 different keys to handle and switch.. ( and sometimes forget to make an update on the Market with your debug key!)

The issue was that I placed the "android.permission.INTERNET" line inside the "application" area of the Manifest file.

Related

How to solve "Property muws_disruptive_ads_minor.POLICY_NAME not found"

App Status: Rejected
Your app has been rejected and wasn't published due to the policy issue(s) listed below. If you submitted an update, the previous version of your app is still available on Google Play.
Issue found: Property muws_disruptive_ads_minor.TITLE not found
Property muws_disruptive_ads_minor.SHORT_DESCRIPTION not found
Issue details
We found an issue in the following area(s):
• SPLIT_BUNDLE 1:
About the Property muws_disruptive_ads_minor.POLICY_NAME is not found Policy
Property muws_disruptive_ads_minor.POLICY_DESCRIPTION not found
About the Property muws_disruptive_ads_minor.POLICY_NAME2 not found Policy
Property muws_disruptive_ads_minor.POLICY_DESCRIPTION2 not found
Action required: Submit an updated app for review
Here's what to do to help get your app on Google Play:
1. Make sure to read the applicable policies or requirements:
o Property muws_disruptive_ads_minor.POLICY_NAME not found
o Property muws_disruptive_ads_minor.POLICY_NAME2 not found
2. Visit Google Play’s Academy for App Success to get contextual learning on this Google Play policy.
3. Make appropriate changes to your app (if possible), and be sure to address the issue described above. You may also want to check your app's store listing for compliance, if applicable.
4. Additionally, follow these steps to bring your app into compliance
Property muws_disruptive_ads_minor.NEXT_STEPS not found
5. Double check that your app is compliant with all other Developer Program Policies.
6. If you made changes to your app bundle, store listing, or APK, please sign in to your Play Console and submit the update(s).
What can I do?
Looks like the email was not properly formatted. From the text, it is clear, your app was rejected due to Disruptive Ads.
Are you showing Interstitial ads too frequently or while opening/closing the app?
Make sure Interstitial ads are not blocking the easy navigation and are shown only at appropriate times.
Same here, I think this an error from Google Play that don't fill the message vars but the remanent error is disruptive ads. Check if you are sending clear traffic (no https) to all hosts.

Show blank google maps in codename one

I'm building a codename one mobile application and i need to fetch a blank google maps on which i can place icons showing my own coordinates (not places i can fetch through the google places api). How can i do that ? Since i don't want to fetch anything other than a blank map, i wonder if i need a webservice for that. I have read that instantiating the MapContainer would show me a blank google map but i am stil getting a osm map (on both the emulator and a real Android 4.4 device). I have already done all the procedures required to get a key and all the steps of the maps demo work fine for me. Now what i need to know is how to be able to get a blank map.
Thank you advance for the answers.
You get OSM on the device as a fallback when initializing the native map failed. Make sure you followed the integration instructions as explained here.
You can debug the issue on an Android device by connecting the device with a cable and launching the DDMS tool from the Android command line SDK. In 90% of the cases this means your SHA1 is different from the one defined in the maps API and this will be printed when you try to open the map.
On the simulator OSM is shown unless you provided the Google maps provider in the constructor.

Android Wear Google Maps

I just started using Java, seems pretty straight forward. When I make a gps app with google maps on an android device there's no issue. However, I tried to incorporate an android wear device (Currently running on a simulator). My dismiss overlay pops up after a long click, but the map comes up blank. I'm getting the map and it's not null so I know it's there. I'm thinking I need to use the handheld location listeners but I'n not exactly sure how to point them towards each other. If someone could point me in the right direction I would appreciate it.
-WD
You need to have the google maps api key setup on your android app. You then need to make sure that the package name in the android manifest files are the same. This is the part that hung me up for a while. Once you do that, you should see the map render.

How can I show GoogleMap v2 on Android

I tried to show GoogleMap v2 in my Android application,but it failed.
Application didn't exit but I can't see GoogleMap on display as following image.
I got API key and set it in Android Manifest, and I did other settings for using GoogleMap v2.
For example, I added 7 permissions, 1 users-feature, 2 meta-data in Manifest.
Now I did nothing in MainActivity.java.(Just try to show main view.)
Is something missing for using it?
Is there anyone who has experience like this?
Please teach me how.
And I compiled it by Google API[Android 4.2.2]
Image URL : https://dl.dropboxusercontent.com/u/88565794/2014-02-07%2023.15.21.png
Have a look at this blog post, that describes almost the same problem:
http://android-er.blogspot.nl/2012/12/google-maps-android-api-v2-with-blank.html
If you use Google Maps Android API v2, but with a blank (gray) map displayed, and "E/Google Maps Android API(12676): Authorization failure" reported in LogCat; may be caused by a wrong API Key assigned.
In order to use Maps Android API, you have to assign a API Key in AndroidManifest.xml.
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your API Key here"/>
But there are many more sources availble that describe a similar problem: https://www.google.co.uk/search?q=google+maps+v2+blank+map&client=safari
Ofcourse I can't tell you what you did wrong, but I would suggest you take a tutorail like this one:
http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/ It even provides some how-to's on customization.
Or have a look at the documentation: https://developers.google.com/maps/documentation/android/start
Are you installing the app to your device from a different computer than the one you generated the debug key from? If so, you would need to add that debug key as well to you developer console settings.
I had this issue, maybe you're having the same issue.

Android Google Maps Creates Blank Tiles [duplicate]

When I switched from my debug map key to my signed map key my maps stop working. I get the following errors in logcat:
09-03 18:18:04.112: WARN/System.err(4073): IOException processing: 26
09-03 18:18:04.112: WARN/System.err(4073): java.io.IOException: Server returned: 3
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
09-03 18:18:04.112: WARN/System.err(4073): at java.lang.Thread.run(Thread.java:1019)
I've double checked everything, permissions and library are in place. I've recreated the singed key and no luck.
Any ideas?
I had the same problem and I figured there wasn't any helpful answer around on the internet so hoping this should help everyone in the future.
When using GoogleMaps for Android, you need two keys - debug and release.
The "debug" key is kind of a misleading term. This key is also to be used when you develop the app in Eclipse. So essentially, use the debug key for development, testing, debugging.
When you're ready to launch the app to Market, set the android:debuggable="false" in the AndroidManifest.xml and use the Signed API key.
When using the signed API key, the MapView will show up ONLY when the app is installed from the Android Market. So, installing the app from Eclipse (Run As, Debug As, etc) or command line (adb install) won't show the MapView. Rest assured, once the app is in the Market - you download it and the MapView will show up.
With the signed API key, if you deploy the app from Eclise, you will get a "Server returned 3, IOProcessing Exception 26" as a warning - just ignore it.
Note: Also ensure there are no duplicate instances of the same MapView. If your app needs "x" no. of MapViews, generate "x" no. of new signed keys (one for each MapView) since GoogleMaps has a query limit for a single MapView instance.
For getting both the keys, follow the steps for Obtaining API keys for GoogleMaps on Android.
Happy Coding!
UPDATE:
The link above for obtaining api keys is now a deprecated procedure. Refer Obtaining API keys for GoogleMaps Android API v2 going forward.
Finally Its fixed.
I am using Windows machine, so I simply went to C:\Users\rohit\.android and deleted debug.keystore and default.keyset1 once this is done, I went to Eclipse and applied a clean build to my project and its done!
Signed map key is used for release app. So you will get such info. if you debug the app via USB-tethered with signed map key. Switch back to debug map key if you want to debug the app, and replace it with signed map key before you release an update or new version.
I had the same problem. In my case, what I was doing wrong was this. I was writing the keytool command like this:
keytool -list -keystore debug.keystore ...
instead of:
keytool -list -keystore ~\.android\debug.keystore ...
So I wasn't updating the Eclipse's keystore with my fingerprint.
I hope this helps someone :)
If you are using a debug key that somebody else has generated and provided to you, that is the reason for the blank map with the following exception.
java.io.IOException: Server returned: 3
You can use this link to get an API key : https://console.developers.google.com/apis/credentials
This link will take you to google credentials page, the new place to get API keys.
I just encountered exactly the same problem.
There is no user-written code that throws the Exception: it is generated in the Eclipse logcat and the result is that you do not see any of the Google map tiles. Like Jen, I regenerated the key, to no avail.
The platform is Android 3.2, the device is the Asus Transformer, the connection is WiFi.
FYI my Android 2.2 application works fine, retrieving the map on a Droid over 3G.
Here is the solution to my problem, hope it helps Jen:
In my case, if I install the release version onto the Transformer using the "Debug as" Eclipse icon, with the Transformer USB-tethered, the map is failing as described above (FYI this is a procedure I have used successfully many times with Android 2.2 and other devices).
So I tried this instead: I use the Eclipse File|Export... option to create a release APK, and then install that APK onto the Transformer using its Asus Sync application. Everything is fine. The map tiles appear.
one more thing:
After adding -v you must remember that the google API just need MD5 not SHA1.So please check what code you give to google.
I have same question but I think I found the answer!
Decide follow these step https://developers.google.com/android/maps-api-signup and receive your certificate's MD5 fingerprint
While development, if map's not showed, don't worried about this! Simple extract APK use android tools with key tool which's used in first step and use this APK file to install on your phone, you will see MapView
Anyway, while development time, maybe you don't see MapView, but it's till not problem and don't worried about this! Simple wait when finished app & build with your keystore and you will see map display correctly
For the poor souls that tried to build the map example from sdk extras: as soon as I renamed the package from com.example.mapdemo to com.mynmae.mapdemo, the map magically appeared. Yes, I lost an hour searching and trying and it silently rejected the package name.
I'm from the future! I've experienced the exact same problem. But this might be an issue for novice developers.
When you created a new google maps activity in the android studio, there's a link to get yourself an API key inside the google_maps_api.xml file. So what happens when you follow this link is that Google will create a "debugging" key for your project. Which, as Sagar Hatekar explained, is indeed, only meant for testing and dev.
To be more clear, Google identifies your project by the SHA-1 certificate fingerprint (also stated inside the comments of google_maps_api.xml)
So what I'm trying to say is that you CANNOT use the same key for several projects unlike the open/public APIs out there.
https://developers.google.com/maps/documentation/android-sdk/start
In this link, they have a small section with the topic of A slightly less fast way which might be a try to explain this phenomenon.
Therefore, if you are using the same key for a project which, the key is not meant for, try requesting a new key.

Categories

Resources