I have seen several threads around this issue but I am still struggling.
My app is failing to sign in on Android with:
Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me?language=en_US
I had this all working about 4 months ago but my hard drive failed and I am trying to get things working again on a newer version of Unity. I am only having this problem with NEW builds. My old apk still works fine so everything must be fine in the Google Play Developer Console. Something is not setup right in Unity.
I have tried with and without setting the "OAuth2 Client ID" from the Developer Console in the Android settings.
I have tried setting the keystore to .android/debug.keystore using the androiddebugkey with "android" as the password for both.
What else could it be?
So to sum up my comments up in an answer, that might be useful to somebody else.
1.) An app authenticates itself towards the Google Play Services with the combination of Keystore and Package name.
You can't sign in without or with another keystore. So you should always backup the keystore file together with your project in a version control system, that is safe from a single hard drive failure.
2.) If you lose keystore file, you can not update your app anymore.
But you could create a new app and link it to the same Google Play Game.
I am trying to set up Google Play licensing with my app. I have followed the documentation precisely, yet I still can't get it to work:
the LVL library is the latest version available in SDK Manager
I copied the license check implementation exactly from the sample app
I copied the BASE64 key of my app from "Services and APIs" in Google Play to the BASE64_PUBLIC_KEY field and made sure countless times it was copied correctly, contained no white spaces
I uploaded the app to Google Play as alfa, also tried uploading it as beta and production draft
I tried running the same compilation of the app both signed with a debug key and the key with which I signed it for Google Play(the exact same apk)
I tried setting different static test responses on Google Play
Every time I run the app on any device where I'm logged to my developer account, I always get NOT_MARKET_MANAGED error. I've read through countless forums but none of the answers helped. What else can I do?
I had the same issue and I found this note on developer.android.com:
Note: Previously you could test an app by uploading an unpublished
"draft" version. This functionality is no longer supported; instead,
you must publish it to the alpha or beta distribution channel. For
more information, see Draft Apps are No Longer Supported.
Here's what I did:
Signed and uploaded the apk file. I uploaded as beta, but I don't think it matters.
Published the app. Note, I didn't promote it to production. I used the dropdown in the top right corner. You may see the option "Why can't I publish" and no "Publish" option. If you click "Why..." it will explain what you have to do first. In my case I had to upload at least 2 screenshots.
You can unpublish straight after publishing using the same dropdown.
Give it a good few hours, may be a day.
Next day my app started to receive responses according to my "Licence testing" setting in the developer console.
This question describe relatively same problem. But my problem seems unique in these points,
My apk is signed.
App was upload a week ago.
Purchase items was created a week ago.
I'm using a listed account for testing.
In app version 3.
The only confusing point is that KeyStore generated from a different device using Eclipse, I'm using Android Studio here.
The problem leaves no clue except above point. Any idea will be helpful.
Recently I try to implement a leaderboard by Google Play Game Service.
And first I import that sample project TypeANumber. I follow the way here https://developers.google.com/games/services/android/quickstart step by step.
I used the keytool to generated the SHA1 of keystore, and use this SHA1 to verify the app.
Then I sign the app by the keystore.
When I run the sample and try to sign in. I got the error "Google Play Game Services - unable to sign in".
Then I double check all my steps and try again. Still got this error.
I searched this problem on google, and I find this man got the same problem with me
Google Play Game Services - unable to sign in
All the situation is the same. And he got the solution.
I follow his solution delete my app client ID on Google APIs Console, unlinked my app and relinked it with the proper Certificate Fingerprint.
All this work done, I still got the same error.
Did I miss something? Any body got the same problem like this ?
Or maybe I should create an app with the same package name of the sample project and upload the apk ?
Or maybe Google Play Game Service doesn't work at China ?
I have encountered similar issues and I note that this page was updated on 30th May 2013 which
may help you, or me, or maybe even both of us !
https://developers.google.com/games/services/android/troubleshooting
Update: I worked my way through this and eventually realised that I had two different app_id strings in my project - one for the Facebook API and one for Google play Game Services! The two strings were stored in different files so my error was hard to find. Once I renamed one everything worked fine. One problem that I have encountered is that I am unable to test with the id that I used to define the Game in the developer console. Other people have mentioned this elsewhere on SO but no harm mentioning it again.
I am working on learning in-app billing but I am having a problem with the google's in-app billing example, the Dungeon one.
I have already set up the application, added my public key, and changed the API_VERSION to 1 in the makeRequestBundle().
I have already exported and signed the application and uploaded it onto Google Play and saved it as a draft with a few pictures and activated the apk. I also added both the sword_001 and potion_001 as published in-app purchases!
Next I installed the signed app onto my phone but when I try to purchase either the sword or the potion I get an Item unavailable error
The item you requested is not available for purchase.
I even tried on a different device to make sure it wasn't because developer's can't purchase their own products, and I get the same message on both devices.
What have I missed?
Check your versionCode. It can't be higher than the last published/unpublished version in any of your distribution channels (prod/beta/alpha).
In app billing seems fraught with pitfalls, but this is what I found that affected availability of items for purchase and also suitability of application:
My code for what it was worth was strongly based on the Google Android demo, but I stripped out a lot of the complexity. I have a feeling that having got it to work a better result would be produced by writing it all again from scratch.
I got the static test product ids going first.
Despite what the documentation says, it seemed to me that the purchase item(s) must be published, even when using a test account. Mine didn't work when they weren't, anyway, and I waited quite a long time to see if they would start to work as others have suggested - they still didn't.
You (I anyway) can't publish a purchase item without publishing the app, so what I did was upload and publish the app, create the purchase items, publish them (big button at the bottom of the page), then unpublish the app again. This seems to leave the items published.
The app must be signed in the usual way (I did this by exporting from Eclipse) before uploading, but what isn't so obvious is that the app you load to the mobile MUST also be signed in the same way - ie a (debug signed) version loaded to the device by Eclipse - run or debug - isn't going to work.
They also both need the same version number, I think. Not 100% sure. If so that would unfortunately kind of imply that customers with old versions installed can't purchase anything without upgrading.
When the app is uploaded to Google, it can take several hours before it becomes available and you get all the right responses for the in-app billing. I find 1-2 hours typically.
I suspect the other comments on this subject about whether you use a gmail or googlemail test account might be red herrings, but for what it is worth, my test account is gmail.
I did come across a useful little note on the internet somewhere about how to change your primary account on the mobile without having to do a hard reset (and consequently losing everything), but unfortunately I haven't managed to find it again.
What I did find though is that one can have several google accounts on the mobile, and then select the one to be used by Google Play.
Hope this helps somebody. I have to say its a pretty complicated system, with not many switten down answers, and I nearly gave up on it.
If your app are on closed alpha testing, you have to sign in with your test account to Opt-in URL; https://play.google.com/apps/testing/{your.app.namespace}
My experience on this error is:
Make sure to upload the signed APK to developer console.
Make sure to install the signed APK on your device not launch the app in the debugger.
Make sure to create a test account in your developer console.
Make sure to sign in your device with your test account.
Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial)
It's no longer sufficient to just upload an unpublished draft apk to test in-app billing. What you need to do is upload an apk to the alpha or beta apk section on the Developer Console. Then, you need to publish it. If you also have a draft apk in the Production APK section, be sure to delete it before you publish. Otherwise it will be available to everyone.
Publishing an alpha or beta apk makes that apk available to only those testers that you specify/allow.
Here is Google's documentation on this:
https://support.google.com/googleplay/android-developer/answer/6062777?rd=1
Well I found a solution to my problem. I wasn't able to get Google's in app purchasing example to work but I was able to get this InApp Billing Tutorial to work using the steps I mentioned in my original post.
If nothing else this may be helpful to someone to see all of the steps that need to be done to test one of the in-app billing examples.
Also had this problem for a couple of days and searched around a lot. I found this guy who said deleting the app and then reuploading fixed his problem, and that actually worked for me aswell.
Try that, delete your app from the developer console entirely. And reuppload a new signed apk and set it up all over again
Publishing the app did the trick for me(and leaving it published (!)). I had to wait a bit for Google to update their database as well, as mentioned elsewhere, changes on Google Play are not immediate.
Anecdotal Supplement: If you have an existing app in the portal already and you want to test a signed version, but not upload it into the portal for distribution. Do the normal steps to build a signed version BUT use your latest version code that is uploaded into the portal. You will will be able to do a quick and dirty test of purchasing (you can't upload this version on the Google Play portal, but it's a means to an end for a localized test (or even as a way to allow side loaded distributed versions/flavors that use Google Play for billing legitimately.)
3:)
Check if your device have more than one account then remove other accounts and keep the account you have entered in play console then it will be solved.