Android App dev in XDK fails to show map after Publishing - android

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 ?

Related

Why doesn't my deployed Android app sign into Google Play Services, while my debug app does?

My Android app's login to Google Play Games services seems to fail silently: after choosing the user in the sign-in activity, onActivityResult() receives a resultCode value of 10002. The Android APIs deposit these messages in the logcat:
W/SignInActivity(16216): onSignInFailed()...
W/SignInActivity(16216): Sign in failed during 6
W/SignInActivity(16216): ==> Returning non-OK result: 10002
while Log.w() commands I placed in onActivityResult() deposit these messages:
W/Main activity(16167): In activity result with code 10002
W/Main activity(16167): activity result requests sign in
W/Main activity(16167): unsolved resolution
The strange thing is that it used to work, and when I try to debug it from Android Studio, login works perfectly every time, so I can't even debug the app!
Where can I get started debugging this?
I found the solution thanks to a problem with the same error but a completely different cause, but this situation is different in that it was caused by activating a feature in the Google Play Developer Console.
The keys to this particular error are that:
The production app used to work properly, but doesn't any more.
The debug version still works properly.
Back in May, Google introduced a feature wherein they sign your app in the Play Store. My original app was signed with the certificate generated by Android Studio, but Google seems pretty gung-ho about their signing so I switched to that without reading the fine print very carefully. As a result:
For the debug app, the Google Play Games API expected the debug certificate, and Android Studio still used that certificate to generate a debug apk, so the Games API routinely accepted sign-in while debugging.
For the production app, the API expected the Android Studio-generated production certificate, which Android Studio happily supplied, but Google Play replaced with its own certificate, so the Games API routinely rejected sign-in.
The solution is to:
stop cursing;
visit the App signing option under Release management in the usual Play Store developer Console;
copy the SHA-1 fingerprint under "App signing certificate" (not the fingerprint "Upload certificate" -- that's what got you into this mess);
visit the Credentials page at Google's site for developers
select your app
paste the certificate you just copied into the text field labeled "Signing-certificate fingerprint." (The field itself is below some instructions on how to extract it from your keystore -- don't use those instructions when Google signs your app!)
At this point the deployed version worked for me like magic. No programming required!

Android Google Login works only when device connected

I have a android application with integrated google login which I followed from this tutorial:
https://developers.google.com/identity/sign-in/android/sign-in
Now I want to log in and generate token id which works fine when I debug the application from the Android Studio.
I have exported the application as a Signed APK and installed it on my phone but then I am not able to log in with Google.
It can be related to google developer console's debug key and/or release key. Which one do you have? Debug key could not be enough to install from apk.
VERY IMPORTANT EDIT:
To use the apk's located in [your_app_folder]/app/build/outputs/apk should be a solution to your problem.

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.

Google maps v2 android api key working only with debug key

I have a problem with Google Maps api v2 on my android app.
I have generated the key for the debug certificate and everything works fine, but I can't make it work with the release certificate.
I've generated the key and the alias with eclipse, then I took the SHA1 which eclipse shows at the end of the "Export signed application" process.
Then I generated the api key for android apps in my google api console using
SHA1;package name
But it doesn't work... it works only with the debug key generated in the same way, only using the sha1 of the debug certificate!
Please help me, otherwise I can't release my app
Check your manifest file, I guess you've forgotten to set your release map api key there while exporting with your release key?
Me too faced the same problem during releasing my app to google Play, when I used Google Maps V2 in my app. After succeeding the issue, I wrote a blog post regarding this you can have a look.
As everyone requested, I would say the answer in following steps
1) Sign up your app using eclipse adt
2) Note down the SHA1 finger print which will be displayed at console of your eclipse adt
3) Again go to google console and get API_KEY for your app by using above got SHA1 fingerprint
4) Replace the old API_KEY with the new API_KEY on to manifest.xml of your app
5) Again sign up your app. Your app is ready to be published. But keep in mind that once you published your app to google market, you should be able to release updates to your app by signing .apk using the keystore which you used earlier for release.
Hope this helps ...
There are two files google maps api.xml, one is the debug and release the other, then you should replace the key generated on google website console and enter this file, another outlet is inserted directly into the manifest.

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

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.

Categories

Resources