I am working on a version-controlled Google TurnBasedMatch Android application on two separate machines.
What works:
Creating matches and taking turns between Gmail 1 and Gmail 2 from devices running the debug app from Machine 1
Viewing in-progress matches between Gmail 1 and Gmail 2 from devices running the debug app from Machine 2
What does not work:
Creating matches and taking turns between Gmail 1 and Gmail 2 from devices running the debug app from Machine 2. Reading match data from an already existing game works fine, but any attempt to create a new match or alter an existing match results in GamesStatusCodes.STATUS_CLIENT_RECONNECT_REQUIRED
I have generated an OAuth 2.0 client ID for each of the two machines and added them to the Google Developer Console. That seemed to be the solution to the similar issue on this StackOverflow thread. Before this was added, I wasn't even able to login to Play Services, so I am unsure if this is related to the current issue.
Looking for ideas on credential/access-based differences that could exist between the two machines.
Finally figured it out - the key was to create a "Linked app" in the Google Play Console for each of the OAuth 2.0 Clients generated in the Google Developer Console. I only had an app linked to Machine 1 previously.
Related
I have an app that already have had several releases pushed to the Open Testing track:
The earliest release was 22 hours ago and the latest, 2 hours ago. However, no one seems to be able to access the app with either links provided here:
The first link for joining on Android shows this:
The second link, for joining on the web, prompts me to sign-in to my google account, and then shows this:
However, people that were originally in my internal testing email list can access the app from the first link, but not the second link. I am also able to download, install and run the app from the first link on my Android Emulator (using my own google account which is in the internal testing email list).
I've tried adding new users to my internal testing email list, but that didn't allow them to access the Open Testing release.
I've also tried pausing the internal testing track, but that did nothing. I have read elsewhere that the open testing app will only be available after a few hours, but the first release has already been released 22 hours ago.
How do I fix this?
If you see there it says "In review", you should expect them to review and approve it since there are many cases of misuse of apps in the Play Store.
You can see the status in "Go to Publication Summary":
I'm essentially in the "Hello, World" phase of implementing Google's upcoming Android Management API (beta) for devices. I've gone through the Android Management API (beta) introduction and several guides and I'm stuck at the very basic step of enrolling a device. Following Google's Quickstart guide, and the general outline of the code embedded in the linked IPython Notebook, I've managed to:
create a project,
create an enterprise,
create a policy,
script the process of generating an enrollment token and displaying the resulting qrCode.
It's step 4 that appears to be the problem: I'm stuck in actually enrolling a device. Doing a factory reset of a 7.1 device, I'm six-times tapping on the welcome screen, and getting to the qrCode scan. That appears to work, and the device gives some indications that it is managed, but I am so far unable to see the device ID listed when I request all devices via method enterprises.devices.list. That API call returns 200 OK and an empty list:
[]
Even waiting 24 hours, that list is still empty.
I'm assuming that I've misconfigured something with the JSON/qrCode, but I'm currently at a loss as to what. Help please; through the linked Android Management API (beta), how do I properly list the enrolled devices?
Looks like this is a bug with the particular Android device with which I'm currently working: Lenovo Tab 4 10 X304F (2G, 32GB). We can utilize the manual workflow of afw#setup as the username, and then type (not QR scan) the 20 character code enrollment token and it works as expected, but any attempt to QR scan results in enrollment failure.
For future web searchers, the actual failure presents as an "iZat" location consent prompt which interrupts the provisioning process. The provisioning process is apparently not robust, and can't be restarted or continued. The only recourse is to factory reset and go the manual code entry route. In short, a paperweight for our purposes.
I am trying to set up linking app for OAuth 2.0 client ID from following official instruction:
https://developers.google.com/games/services/console/enabling#step_3_generate_an_oauth_20_client_id
I found a problem: the "Certificate fingerprint: SHA1" is created from one computer's debug.keystone. So running app on android device from that computer is perfect.
But if I changed to another computer to develop, even the code are the same, the running app will error out(because the fingerprint not match). If I need to use multiple computer for development the sample app(for example, synchroniced by git), how do I manage to run the app smoothly from all computer? Is that possible? Do I just copy over the same keystone?
Thanks
---update:
I tried to copy over the debug.keystone, it doesn't work. The error message changed, but still show the fingerprint not match.
I'm trying to implement Google Play Services following Google's documentation and I'm seeing the following when I try to connect my GameClient:
E/Volley: [4953] il.a: Unexpected response code 401 for https://www.googleapis.com/games/v1/players/me
E/Volley: [4953] il.a: Unexpected response code 401 for https://www.googleapis.com/games/v1/players/me
E/SignInIntentService: There is no linked app associated with this client ID.
I've checked that the SHA1 fingerprint of the certificate signing the APK, the SHA1 of the debug certificate, and the SHA1 given to the Google API do match up and they do. I've checked that the app id is declared in the manifest in the application item (I've taken in my case the 13 digit numerical id, not one that also includes a package). I've also checked that the test accounts I'm using are each listed in the Developer Console and they are; they're each #gmail.com too, and they include my developer address. They've each activated Google Plus.
I've tried this from an API 16 S3 device and an API 17 Google API simulator. The app's package name is correctly declared in the manifest, on the developer console and matches the API package name. The app is listed as a client of the game service, and is shown as 'ready for testing'.
In short I'm struggling to see what my mistake can be and what I've missed. I think I have everything from Google's troubleshooting addressed too. I've looked at the main questions here on StackOverflow, and they're covered. Whatever it is I'm missing is probably staring me full in the face. What can I be missing?
I got stuck on this problem for a long time until I realised that I had two strings in my app called "app_id". One from the Facebook SDK and one from Google. I renamed the Google app_id (and changed the corresponding manifest reference) and all was well.
It is POSSIBLE that you have a similar problem. If you can't see the error then I would try to write out the app_id to syslog to confirm that this is not the cause of the problem.
Incidentally, all my Google app_id s (client ids) are 12 bytes not 13, so perhaps you should start by checking that.
Good Luck !
Even after redoing everything, everything, I still encountered the same problem. However, I subsequently encountered a "This package is already in use" error message on Google API even though I had undeleted all projects and removed all clients before deleting these again.
This turned out to be a blessing: The solution to this was to recreate my debug key before adding the new fingerprint to Google API in another new client id.
And lo... my original problem went away.
I hade the same problem and for me it worked to re-link the app in Game services -> Linked apps -> Link another app.
You didn't explicitly state that the gmail accounts you're testing with are added as Google Plus users in a Google Plus community that is configured as the testing community for your app -OR- that you're using a google group as the testing community and those gmail accounts are part of that community.
If you have done those things, then it might be the issue stated here:
https://code.google.com/p/google-plus-platform/issues/detail?id=554
This answer might sound encouraging to solve your problem, but don't get your hopes up. I've done all that the original poster did, plus the things above, and I'm still stuck.
I've even followed all of the tips stated here:
Google Play Game Services - unable to sign in
And it would appear the depths of the chasm that Google lets you fall into regarding GPS is far deeper than the depths I've plumbed. Joy.
I had the same problem ,I am not sure that the following action is the one that resolved the problem but its worth the try,
Seems that I didnt had the Drive API enabled ,I had it in the enabled apis but i had to actually click the gear icon next to it and then click enable and provide the application name.
Just link the same package as many times as you have Client ID's in your Developer Console "Debug & Release Client ID's"
The thing is if you link your app to the Game Services with the wrong SHA1 fingerprint, Games Services will pick it up and associate it as the main Client ID.
Once you link the same app again to your Game Services, it will automatically pick up the other Client ID's
I had exactly the same problem, and in my case, I fixed it regenerating the API Key from the Google APIs Console. Go to Credentials, select your API key and then click on "Regenerate Key". You don't need to update anything in your code or link more apps, just regenerate and it starts working magically.
Working on trying out the market licensing service, and I'm running into a few problems with the sample application.
When I first ran the sample, I got an error saying that the application was not licensed. I linked my account to the simulator in order to get it to get the test response, and now I get an error saying "Application error: NOT_MARKET_MANAGED"
Does this mean that I have to upload the app to the market in order to test to see if it works?
Yes your app has to be on the market and if it already is, you have to have a version code number which is greater or equal than the one already published.
There may be another way. The comments on the sample's MainActivity read:
* The first thing you need to do is get your hands on your public key.
* Update the BASE64_PUBLIC_KEY constant below with your encoded public key,
* which you can find on the
* Edit Profile
* page of the Market publisher site.
* <p>
* Log in with the same account on your Cupcake (1.5) or higher phone or
* your FroYo (2.2) emulator with the Google add-ons installed. Change the
* test response on the Edit Profile page, press Save, and see how this
* application responds when you check your license.
And when you log into http://market.android.com/publish/editProfile you will see an option for changing the License Test Response:
Textually saying:
This License Test Response will be
sent to devices using #gmail.com
or the Test Accounts listed above for
applications you have uploaded to
Market. Additionally, this account
(but not the Test Accounts) will
receive this response for applications
that have not yet been uploaded to
Market.
If you click that selection list, you will see different options:
I guess all you have to do, for that initial sample LVL tutorial program, is change the response from Respond normally to LICENSED or any other setting you want to test.
UPDATE: It turns out that the above measure is insufficient. I still get the NOT_MARKET_MANAGED error. I guess that "Market Licensing Example" must be uploaded as previous answers suggested. Note, however, that it cannot be the debug version:
Oh, and you can't really upload that "Market Licensing Example" as is. You must at least change the name of the package:
I can see how Google's sample/example system could be improved to become more developer-friendly...
Weird. After uploading the application (just uploading and saving draft, not filling any other required fields), the "Market Licensing Example" stops issuing the NOT_MARKET_MANAGED error, despite the fact that clearly selected NOT_LICENSED. Instead it responds with the message Allow the user access. I also tried setting (for test & learning purposes) it to ERROR_SERVER_FAILURE but I get the same Allow the user access message.
Why?
You'd have thought "Saved Draft" would be just what this is for. Otherwise, you're selling an app which by definition cannot have been fully tested live.
Upload your app (.apk) to the market. The default state will be "Saved Draft", so it will not be be visible to the public, but you can still test the Licensing.
One other potential problem:
Make sure that the version you are testing/running has the same android:versionCode in the AndroidManifest.xml as the draft version in the market. If the versions differ, you will receive a NOT_MARKET_MANAGED error. (Apparently the RSA keypair used for license
checks is on a per-app/per-version basis.)
After a bit of a struggle I got this working. You can't use the LVL sample as is.
Here's what I did:
modify the project's package to something else (I used: lvl.test)
set MainActivity's BASE64_PUBLIC_KEY to the one in your Developer Console profile.
export the signed app
go to Developer Console and upload the app (create dummy images and give it a dummy name and description etc. just so that it saves and is listed as 'Unpublished')
install the exported app (from your filesystem) to your test device (i.e. adb install bin/path/to/your.apk)
on your device, open Android Market go to: Settings>Accounts> and select the one that corresponds to your Developer Console account
you can now select a static License Test Response in your Developer Console Profile and save it. When you run the LVL sample on your device the response will correspond to the one you picked!
From my experience, the app has to be published before LVL starts working, incl. static response testing. For me ERROR_NOT_MARKET_MANAGED went away only after publishing although the docs say you can Debug and test an application's licensing implementation, prior to
publishing the application.
Cool part is you can publish while only having alpha/beta builds -- the app won't really go live, only testing accounts will be able to use it.
When you're preparing for initial release, it may seem unnatural to hit Publish before you're completely sure everything is in working order (and the fact that you have to put in the description and screenshots before you can do that is even more alarming -- you'd think those are final touches) -- but you should, just make sure you've made a sane choice about the package name and whether the app is paid or free -- those things can't be changed after publishing. Publishing alone does not make the app public; unless you have a Production build don't worry about accidentally making an untested version go live.
This is related so it might help somebody:
I was testing on an Asus transformer and had to delete all non-developer accounts to get license testing to work (including my yahoo account). Once the other accounts were deleted all of the steps worked without a problem.
In my case I was getting because of Version code difference as..
Already published apk's version code = 2
and after some testing release new apk's I had set version code to 5
which was causing this error as version difference should be exact 1 with currently published apk..
same was applied with version name too..
If you already tried all the suggestions above try this:
I had the same response for a while and I could not figure out why this was the case. I read the entire documentation on App Licensing and still receiving the same annoying NOT_MARKET_MANAGED response code.
I was finally abe to resolve the problem by changing my applicationId in the AndroidManifest.xml file. I rewrote an app from scratch starting with a blank new project. The problem was that I did not use the exact correct applicationId. The problem was that the original application on the Google Play Store used a letter in upper case while I wrote all letters in lower case in the newly created project.
Since I corrected the applicationId to match 100% (including casing) I get the expected behavior of the licensing service.