Google Maps not working Android 2.2.2 - android

I'm really hoping someone can help me. I'm using google maps in an application. I am working on someone elses code so I'm not sure how to fix this problem. The code checks to see if textureview is supported, if it is use it else use surface view. The maps work perfectly with newer devices, however, when testing it on a htc desire 2.2.2, there are no maps displayed. It actually says in the logcat authentication error, I'm not sure how this is possible because there isn't any authentication error when running on newer devices.
The code used is from this library
https://github.com/NyxDigital/NiceSupportMapFragment/blob/master/src/com/NYXDigital/NiceSupportMapFragment.java
In the services section of the Google API's console Google Maps Android API v2 only is set on.
The authentication error I think is unusual as there isn't an issue with the newer devices.
If anyone has come across this before I'd appreciate it you could offer some advice
EDIT ---- THIS PHONE IS RUNNING 2.2.2

This may be a duplicate issue of some other API V2 authentication error questions questions please see:
Android Google Maps V2 authentication error
and
Google Maps API V2 - always get authentication error

For anyone that might come across this issue in future...
This line
holder.setFormat(PixelFormat.RGB_888);
of the git hub library code was preventing the map from being displayed, it wasn't anything to do with authorization. The authorization issue was that I wasn't using the correct debug key, but when I had sorted this issue, the maps not displaying was still causing hassle.
So after much debugging and commenting of code, I discovered that the above line is the culprit. So I added a simple check and it's sorted

Related

Google Maps SDK for Android loading empty map

I've tried to use Google Maps SDK for Android in my app and some users are saying they are loading an empty map.
It looks something like this: https://i2.paste.pics/FAUVC.png
However, I'm not able to reproduce the problem myself. In theory, location permissions are not required to load the Map SDK. I've checked my API key in the Google Cloud Platform Console and found all of my responde codes have been 2xx so far.
Would anyone have any ideas on what this issue might be?

PhoneGap and Google Maps API V3 "Disabled?"

So, I am building a simple PhoneGap application that loads a Google Maps API V3 view. I have searched far and wide for an answer, but I have not found a thing. I get the following error when trying to load the API:
"Google has disabled the use of Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API V3 on this site."
I have tried everything. In Cordova, I have all domains whitelisted (""), and the same in the Google Play Developer Console (""). I have even tried whitelisting "file://", but no such luck.
What drives me nuts is, when I use my code outside of the scope of PhoneGap, it works fine. Can anybody shed some light? Thanks!
I have the same issue.
I changed the Google developers console Api key referrers from '*' to '' and then solved my problem.
Just leave the referrers field it blank.
I hope it help. I spent about 4 hours to solve it :#

Updating Android App - Maps Problems

I need to update an Android app that was developed by someone else. Update by itself is simple, it's simple changes to XML layouts.
So I have a following plan:
update an app (done)
test it on emulator (- maps don't work) stuck here!
test it on devices
release updated version to the store.
Unfortunately I am having mulitple problems with the app.
At first, it doesn't compile because the Project Build Target API was set to Android 2.3.3.
Is there any reason why it wasn't set to Google APIs 2.3.3 ?
When I change it to Google APIs it compiles and runs but I my maps don't display correctly.
All I can see is gray rectangle and annotations on top of it. I am getting following error message associated with it.
05-11 20:45:42.554: W/System.err(598): java.io.IOException: Server returned: 3
05-11 20:45:42.559: W/System.err(598): at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
As far as I understood from searching with Google and Stack Overflow that might be related to signing up the application. Currently app is using v1 of Google Maps.
Deleting debug.keystore and key set doesn't help.
I am not sure how to proceed with it. Any help will be appreciated.
In order to make maps display you need a signing key that is associated with the API key application was using. Android API v1 is now deprecated, so your options are limited:
contact previous developer and ask them for debug.keystore, which is stored in ~/.android/ or C:/Users/user.name/.android/ directory or
use release signing key for testing (this might be cumbersome)
Depending on what application is that it might also be a good or bad idea to switch to API v2. New API still has some ugly impl bugs, but you won't notice them if maps usage is simple. The API or v2 is pretty good.

Android: Why does MapView complain about LOGIN ACCOUNTS MISSING when running in emulator?

I am trying to get a MapView to display on the emulator. When I look at logcat, this is the error message I am receiving. I have no idea why?
Device has no accounts: sending Intent { act=com.google.android.gsf.LOGIN ACCOUNTS MISSING }
Any help appreciated.
At the moment it is not possible to run Google Android Maps v2 on an emulator. Check out the comments on this post by Android Developers. Also, look at the official link to the play services
Note: Google Play services is not supported on the Android emulator — to develop using the APIs, you need to provide a development device such as an Android phone or tablet.
A couple of things. Pls. make sure that you have the maps key. Also make sure you have the required permissions on the manifest. For more you could refer to : https://plus.google.com/+AndroidDevelopers/posts/Tyz491d96Ci

Google Analytics and Google Map on Android

I am displaying maps in my Android Application. Nowhere in my application I have explicitly invoked www.google-analytics.com, yet I see lots of request going to this website.This is causing my application to be very slow. Also many times I get errors like Unresolved host www.google-analytics.com.
Is it mandatory for the functioning for Google Maps in Android or can we turn this off?
Thanks
I guess if Google Maps is using some Google analytics internally, there isnt much that u can do

Categories

Resources