This might sound like a stupid question but I can't grasp if I'm doing this correctly.
I created an app in the developer console using the "Game Services"-tab. Meaning I didn't actually "create" an app as far as I understand. In the "All applications"-tab I have ZERO apps because I haven't created one there yet. But if I check the "Linked apps"-tab, I already have an app there with a bundle-id xxx.yyy.zz (not the real id). If I now create an app in the "All applications"-tab with the same bundle-id (xxx.yyy.zz), will it automatically be linked?
To properly link an app to the Game Service you will need to also specify the fingerprint of the signing certificate you use for your app and the package must match.
Check out Step 2 in this guide for the exact steps needed.
Related
I'm trying to create an AccountAuthenticator to be used with multiple of our apps (so one account in the system-settings used by multiple apps). Just like all Google-apps use the same account on the system.
The problem is: How can I set it up that only one app (we don't know which it will be) needs to be installed and when a second app gets installed, it can just re-use an existing account?
I've created my AccountAuthenticator using this tutorial and embedded into a library-project which gets included in all our apps. This works fine when only one app is installed.
As soon as a second app gets installed and the user tries to login, the system shows the intent-chooser dialog where he can pick both of our apps (because they both use the same authenticator-library with the same intent-filter). This should be the problem as well here (but I havn't verified it yet).
With some research you'll stumble across sharedUserId and this tutorial. But this "solution" has the problem, that you need some kind of always-first-installed app with the authenticator in it. Plus, with the new Google Play App Signing a sharedUserId seems impossible because every app will be signed with a different signature.
There might be a way to grant other apps access to the authenticator but there's still the problem that the authenticator-app needs to be installed first (as suggested here).
How can I solve this? How can I share an AccountAuthenticator with multiple apps without installing an app holding it first? How does Google do it? Do they have their authenticator in the Play Services?
Google Play App signing allows you to re-use the same signature across multiple apps, for precisely this sort of problem.
Just choose "Reuse signing key" when you see this screen:
Our contracted Android developer provided us with the source code of the work performed for us, as per our contract. After the contract finished, the developer became busy and is now not reachable. We are moving to another developer to maintain the application. However, we do not have the first developer's keystore so the application is not allowing us to update it.
Is there anyway for us to maintain this application if we cannot get ahold of the original developer? We have lots of customers who have the app with data they have generated, and they need our updates.
If you have push notification feature in your old App then you can send a push to all your user that there is another updated version is available.
And Just upload updated version with different package name. And even you can send play store link in that push message as well. Most of people use this technique and they got success to move all user from old app to new.
No you can't update your app on the store without the published keystore.
You can publish the app with another name and keystore (a new app so with a different package name) but you can't update it.
Recently I've been trying to get my Adobe Air AS3 Android game to work with Google Play Game Services.
I'm using the Milkman Native Extension and Flashdevelop.
I made my own sign in button, and when I press it the standard "Sign in with your account" window with all my accounts appears. The first time I sign in with an account it even gives me the standard options to share my game status to my Google+ circles. Then, when I do try to log in, the service shows the standard spinning progress wheel, then disappears, the "Signed in as PLAYER" box doesn't show up, and I'm not logged in. The ANE tells me that it's an unknown_error_code.
Things I've noticed:
It doesn't let me see a list of achievements or leaderboards either.
After the first time I log in it just tries
to log me in again indefinitely.
The "Apps using google+ data" shows it as a "3rd party app" and not the actual title of the app. EDIT: It now displays it as the correct app for some reason. Still doesn't sign me in though...
I'm pretty sure this isn't a coding problem.
Things I've tried:
Matching the SHA1 key with the SHA1 key from my p12 key.
Logging into different accounts.
Making my accounts tester accounts.
Using non tester accounts.
Making new Game Service pages
Making new application pages
Changing my app I.D. (com.blank.mygame)
Clearing the "Apps using google+ data"
Making the Version Number of the game higher than the most recent test account
Making new Google+ accounts
Syncing my app to the services page.
Desyncing my app from the services page.
Making new OAuth 2.0 client I.D.s.
Publishing the game services.
Any suggestions?
Now I can answer my question officially:
I fixed it.
Apparently if you go to the API console and change the Oauth from there the game services doesn't detect it. I originally put in the wrong SHA1 and fixed it through the API and not the google services developer console.
http://www.youtube.com/watch?v=nkJS_W-VC9I (it's problem #6 which is really n)
I was having the same problem, and I solved it by changing the App/Package ID at the Google Developer Console from:
com.developer.appname
to:
air.com.developer.appname
I had simliar issue - the app was asking for permition, but it triggered onSignInFailed event.
Tried several things, the problem was with runtime enviroment - everything works correctly when I include it to application. (I was using separate AIR runtime enviroment to decrease the time of publishing the app)
I'm trying to use Google Play Game Services in my practice Android app.
I got the sign in buttons UI as explained in the developer guide. When I hit the sign in for the first time, it guides me through sign in process. Right after it's about to finish the process, it gives me a dialog with "Unknown error". After the first time, it always gives me this dialog after displaying the loading animation for a bit.
I imported BaseGameUtils and google-play-services_lib. I attached reference from BaseGameUtils to the google-play-services_lib. Then attached reference of these 2 to my game project.
I exported the project to get the SHA1 to put in the developer console. Then I have my 12 digit app id to place on the values/ids.xml (got the meta tag under application).
Tried cleaning the project, redoing the SHA1/keystore process and no luck. My email is under the testing access.
I read and tried the solutions provided on this question, but it was not my case.
Google Play Game Services - unable to sign in
Anybody experiencing the same or does anyone have a solution I should try?
Try going to your Google+ settings on your device and purging the access that you had granted the app. Afterwards, MANUALLY set up Google+ for your test account, either through a PC/Mac web browser or through your device, then try re-linking the app. This worked for me.
Exact steps for Samsung Galaxy S3:
Settings -> Google -> Google+ -> Apps with Google+ Sign-In -> tap the app and at the bottom, tap Disconnect App.
For what it’s worth, I also tapped the option to “Delete all activity for this app” as well when I deleted it.
Your ids.xml has to look like:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_id">XXXXXXXXX</string>
</resources>
And, in your manifest, you have to add:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
Good luck!
I recommend utilising the debug log trace in the GameHelper class to get a clearer picture of the error. You can simply make a call in your onCreate to do this...
enableDebugLog(true, "fred"); where "fred" is the tag you want to show on logcat
It is most likely that you will then see an error like "OnConnection Failed result 4... SIGN IN REQUIRED. If you then search SO for that message you should be able to make some progress.
Another possibility:
I managed to get my own leaderboard into production last night. The error you are describing is one that I (and judging by other comments that I have seen in error reports on SO ) and other people have also encountered. I found that I was unable to use the google account that I user in the developer console to sign on, even though it is explicitly listed as a testing account for the game. I tried shutting down the emulator, deleting and redefining the game in the developer console etc. but I have never been able to get it to work.
I used a different account and I was able to sign on. I do not know what the problem is with my developer console account - I also use it in Google Plus without problems. Incidentally, I am still unable to use my developer account on the production app with a real device.
My advice is to use a separate account for testing. Good luck !
If you are using your production keystore to get the fingerprint, you need to export and use a release build. Otherwise, use the debug keystore to get the fingerprint.
According to https://developers.google.com/games/services/console/enabling#b_create_a_client_id - if using eclipse, the debug keystore is located at
~/.android/debug.keystore
One more thing, for me, I couldn't sign in using my publisher account but one of my other accounts worked ok. Maybe worth a try.
One additional thing that can be tried is to send (as attachment) the exported and signed yourapp.apk to the tester's account's email, and then install the app through email (by clicking on the attachment), and not through the usb.
It seems to me the problem here is not with play services, but with google+, as it sometimes takes several days for the changes (such as deleting some info) to take effect. If nothing works, create a new gmail account, and try again (that's what "worked" for me eventually :)).
Edit: old accounts that didn't work initially started working after 4 - 5 days. Maybe it just takes Google some time to synchronize everything.
Now I managed to sign the apk (using Eclipse Android Tools) and adb install .. to the device for testing.
But this removed the debug function, e.g. "step over" which make problem tracing much more difficult.
Is it possible to debug the inapp billing using Eclipse?
Unfortunately I don't think there is any way to step debug, I have just been using print outputs. This is due to the fact that you have to sign your app with a release key in order for it to communicate properly with the billing service. Very annoying.
When you go through the in app billing documentation, you kinda realize that it can take substantial amount of time to understand this complex piece of technology. Most developers feel the need for a working HelloWorld, and then later play around with the builds.
I have uploaded 2 projects
The android sample project. You can download this project, and immediately run the sample. This will help you quickly debug/trace thru and figure out how the in app billing works.
A cleaned up project to help you integrate your app quickly. This can help like a library. Just integrate make your “purchase requests” on your “checkout” button action.
Mind you : I have not incorporated the security recommendations. Read android in app billing documentation. Until then you are on your own risk.
For 1
Download “http://www.4shared.com/file/f5wH3qke/InAppBilling1.html”
Create a new gmail account for all correspondence (Why, I will explain below)
Pay that 25$ and purchase a “Market Place” account.
Import the project to your eclipse environment
Create a signed application apk, File-Export-Select Your Project-Create OR Use keystore, it should be valid for 25 years from today.
Upload the signed apk to the market place as a “Draft Application”, DO NOT PUBLISH it.
For the uploaded apk, you need to add “In App Products”. You will find this link on the home page for your uploaded apk.
In Security.java dont forget to add your “public key” from your market place account “edit profile” page.
On the “In App Product List”, you need to add the following products one by one
The text below should used as “In app Product id”
sword_001 as Managed
potions_001 as Unmanaged
Title and Description dont matter (for testing purpose). Add what you need here.
Cost add 1$ (minimum)
Click auto fill
Save
Publish the in app project (dont get confused here, you only need to publish the in app product, NOT the APP)
In the test account, add your personal gmail id here. Now, this gmail account needs to be configured as your first gmail account on your phone.
Yes, this WONT work on your emulator
Now the sample app should work.
For 2
Download “http://www.4shared.com/file/h8YnJyf_/InAppBillingIntegration.html”
To integrate, in your calling activity initialize the checkout code
Handler handler = new Handler() ;
CheckoutPurchaseObserver checkout = new CheckoutPurchaseObserver(this, handler);
To send the checkout request for your product
checkout.sendCheckoutRequest(purchaseUri.toString(),null);
Important Note :
This purchaseUri is the “In-app Product ID” of your resource on the “market.android.com/publish-->Create New In-App Product” options. This string should be set as the “in app product” id.
That’s why the “id” is most important. The “In-App Product ID” is how you refer to that particular product.
Also, in Security.java dont forget to add your “public key” from your market place account “edit profile” page.**
Debugging Notes
LogCat will show all errors as InAppBilling tag
This project creates a shared_preferences named “inappbilling” And debug is set to true
The androidmanifest.xml may not be needed since this project does not
have a home screen.
Why do we need to create a new gmail account ?
Simple. The account you purchase your market place account for, cant be used for “testing” your in app billing. Since you cannot purchase products for yourself. And your primary account on your device should be set as a “test account” on the market place account. Chicken-Egg issue here. Hope its clear.
An interesting blog I came by “http://crazyviraj.blogspot.com/2011/06/some-notes-on-implementing-in-app.html“ (not mine).
In my app, I used the test product id, android.test.purchased, which will simulate the actual buying process (ie, will show the in app dialog and you'll be able to purchase and get a response that can be handled by your application). Using that product id, you can run the in app code on the device (unsigned) via eclipse over usb connection. You still might need to work around some things for testing (ie, account for the fact that you are using a testing product id and not your real id), but I found using that product ID did help me quite a bit.
See the testing section of the in app billing guide