How to debug android app when using my real map api? - android

I developed android app. I generated my own keystore and got api for release app. Everything is fine. But when I try to debug my app with this map api key, while I developing it, I can't see my maps. If I export apk and deploy it to device, everthing works fine again.
What should I do, while I developing my app and debugging it to see maps.

There's a difference between your debug key and your production key. If your debug.keystore does not have an API key associated with it, you won't see map tiles (or vector images).
In OSX for example... the debug.keystore is in ~/.android/
Check to ensure that you have your debug.keystore setup with an API key as well.

Related

Android Google Maps release with other api key does not shows

I have some issue that I have been searching without solution. I had have an app with Google Maps working well, but I deleted the project on console.developers.google.com by mistake, then the app stops to show the map.
I created another project on the console, I generated other api key with Google Maps for Android enabled. Then I changed my google_maps_api.xml value, I cleaned the project, then re-build and created a signed apk, but when install the app the maps not shows it.
I already tried this:
Change to "None restriction" for the key and wait for 24 hours.
I changed the XML attribute to templateMergeStrategy="replace".
Shutdown and turn on my smartphone.
Uninstall and install again my app.
Nothings works
You just declare your google map API key in the debug mode. There is one more google_map_api.xml file in the release folder. It should be like this, just copy/paste your api key.
P/s: Don't forget to switch your Build Variants to release before build signed apk

Android App dev in XDK fails to show map after Publishing

I developed an Android app in intel-XDK using Google Maps Android API key. This works fine in dev and testing on devices. I built the app with the same key in code, jarsigned with my keystore, zip aligned, and published at the Playstore. The Map is NOT appearing in the Product. invalidkey or unauthorisedurl . I pasted the cert SHA1 in dev console for api key too. Googling here and elsewhere for a solution I am still unable to bring the Map on product in Playstore. How should I create the correct key for production ? especially in XDK. Anything missing in my build settings ?

API keys causing issues

In my android app I am using google map and location services.So I generated API key on google developer console for my development work using SHA1 generated by making use of debug.keystore.It worked fine and google map worked perfectly. When I had to release the apk I signed apk following instructions at http://developer.android.com/tools/publishing/app-signing.html#studio.
When I tried to beta test the app, google map didn't work.Visiting the forums told me that I need to generate another google console API key using SHA1 generated by using keysotore which was created while signing the apk.I did same and replaced the key in androidmanifest.xml(So now my project on google console has two API keys,older one I used for development,and newly created one ). But when I regenerated apk and tried to run it on my personal device from android studio, map didn't work.Moreover when I replaced new key by old debug version of key in manifest file and tried to rerun app on my android device map still don't work.So now my older key is also not working while it was working fine before all these changes.
Please help me in this regard.
You should be using the same API Key for your applications but you need to add both the debug and release credentials.
So you will end up with two entries in the android applications:
99:88:77:66:55:44:33:22:11:04:76:99:C3:2A:52:71:7C:64:EC:8B;com.package.app
99:88:77:66:55:44:33:22:11:1C:CC:33:D7:74:A2:49:5D:7D:BF:C6;com.package.app
You can refer to this question for help with the process of adding credentials for each keystore.

Android - can no longer see google Maps after going to production

All,
I have been banging my head over this one for a few weeks now. I got google maps v2 setup for debug following all of their directions. I got my debug key based on the debug.keystore and everything worked great.
I was then releasing my application to the Google Play Store and followed the instructions on how to generate my release key and I generated my Google API Key using the Sha1 of the release key as the instructions state.
I released my application to the store and everything works great. Here is the problem though, I can no longer get the maps to show up even when switching back to the debug API key.
Currently to debug I have been releasing a build to Beta, waiting 3 hours, and then fixing accordingly. Luckily my map work has stabilized on this application but I would still like to understand what is going on.
Any ideas anyone?
I suggest that before you release to actually build apk in production mode then do adb install to your device. I try it and see if it works. At least it guarantee working before putting it up
Make sure that the map key id you use in the manifest is for release mode not debug mode.
Just before exporting the app as apk, replace the Google Maps debug key with release key. It worked for me.
Debug certificate: The Android SDK tools generate this certificate automatically when you do a "debug" build from the command line, or when you build and run a project from Eclipse without exporting it as a released application. The certificate is only for use with an application that you're testing; you can't publish an app that's signed with a debug certificate. The debug certificate is described in more detail in the section Signing in Debug Mode in the Android Developer Documentation. You can generate an API key from this certificate, but only use the key for testing, never for production.
Release certificate: The Android SDK tools generate this certificate when you do a "release" build with either ant program or Eclipse. You can also generate this certificate using the keytool program. This certificate can be used with an app you release to the world. Once you have the correct certificate for your needs, you can display its SHA-1 fingerprint using the keytool program.
More here: Google Maps Android API v2

Android Map does not work when apk is not installed from Eclipse

In a project, when I install the app on a handset directly through the Eclipse IDE, I can see the Map functioning perfectly.
But if I send the apk to someone through email and they install it on the device, altough the app works they are not able to see the map but only a blank grid!
We already have the MapKey in the project. For a non-market app, how can I show the map if the app is not installed through the Eclipse IDE on my system?
Each api key is tied to that certificate. When you run a project in eclipse, it uses your debug keystore. When you export it, you most likely are using a different keystore, so your maps api key is no longer valid. Take the keystore you used to signed the exported apk and get a new api key. You'll need to swap the map api key back and forth when you are developing and releasing your app. Hope that helps.
"When you export it, you most likely are using a different keystore, so your maps api key is no longer valid."
Not fully correct, you can Export from Eclipse and then sign map with your key.
So full algorithm is:
1. Export with Eclipse
2. Create key - remember path (say mypath/myawesomeapp.key)
then open Terminal and goto to folder with key and type in terminal
keytool -list -keystore myawesomeappkey.key
And then you get Certificate fingerprint in page https://developers.google.com/android/maps-api-signup
Your Google Maps API key may not match the certificate you used to sign the application, since if you use different keys for signing development builds and release builds, you will need to obtain a separate Maps API key for each certificate.
Please, check this page to find out how to generate a proper API key for Google Maps API: https://developers.google.com/android/maps-api-signup

Categories

Resources