Yes, i tried the keytool but I wasn’t able to SHA1 fingerprint of the certificate… I tried entering the commands suggested by (https://developers.google.com/games/services/console/enabling) in the terminal but I am not getting it.
some more insight here : http://developer.android.com/tools/publishing/app-signing.html
Basically here is what I did
Using finder I created a folder called Keystore at the root of my user folder.
Go to Terminal . it will read something like : MachineName-MacBook-Air:~ username$
type “cd Keystore” (without the " "). You should now be seeing something like MachineName-MacBook-Air:Keystore username$
There first run the following to create Keystore :
keytool -genkey -v -keystore yourappname.keystore -alias yourappname -keyalg RSA -validity 999999
Make sure to copy this line to Textedit first and edit it there to fix yourappname.keystore and yourappname
Once ready take your edited command and paste it into your terminal
You will be prompted with your Mac user password and then a series of questions. Go through these and your keystore will be ready.
Next step is to generate the SHA1 from it. Let me know when you complete the above steps and I’ll write more. Hope this helps.
I managed to generate the keystone already but I couldn’t do the stuff after this.
Great! So then all you have to do is to run the following while your terminal is still inside the Keystore folder :
keytool -exportcert -alias yourappname -keystore yourappname.keystore -list -v
keytool error: java.lang.Exception: Alias <MyApp> does not exist
I got this error while trying
I got it solved already!
By using the following method -
Open the terminal, cd into the directory where your keystore is, and use the command:
keytool -list -v -keystore mykeystore.keystore
And it shall show the SHA1 fingerprint.
Thanks!
And I thought I must be the only one in the whole wide world to feel this way… only yesterday I was going through the same questions… And today is day 2…
A wise person told me if you don’t want to use Achievements thats fine. Just set 5 of them to tick the box and forget about them.
Thanks @ksan. LOL! Yes it seems to be a process from hell! So you confirm that list of steps is really the way to go
I think I will go slow on this one. Thank you for the achievements tip! I may use them after all:) Still I would love to hear also from people who went thru hellish list of steps So we can avoid some common issues that may arise.
Good luck and please share any tips if any. I will do the same.
Thank you again.
Mo
Got my Android 2.2 device soft-bricked trying to upgrade it to 2.3… Read that GPGS on 2.2 is not optimal so I thought I should go 2.3 and now I’m wasting time trying to recover this POS… It being my only Android device and me being not in a mood to buy any new devices put me in a predicament… So tip #1… read the instructions and follow them to the letter while in Android land. It is treacherous!
WOW! That’s does not sound good. I have a feeling that too will suffer since I do not even have an Android device to test. I do have a new Kindle Fire HD but not sure that would work with GPGS. I will assume not.
Man, good luck!
Mo
From what I read I think you can test GPGS on Kindle Fire HD. Might be wrong of course but I think I saw something to that end.
Thanks for your kind thoughts. Fish out of water is how I feel right now. Good luck as you tread through those steps. Do you have ADT (Android Developer Tools) installed on your Mac/PC?
Cool! Yes I know how you feel! No, but I should install ADT on my Macbook. Just starting with Android side of things so I need to get setup. I released an app on Android/Amazon that was not too bad but this GPGS is going to take a while. Still, other did it so can we (trying to cheer myself…)
Cheers.
Mo
Ok. POS phone un-bricked and successfully upgraded to Android 2.3.5 and app still behaving the same way. So back to square one… Re-reading all the instructions and processing once again. Am I really this slow?
LOL! No I am afraid that those instructions make GC integration a child play. I am working on something else right but soon I will need to go thru that list and start calling for my mommy
Good luck and keep us posted on your “great” adventure!
Mo
A trip to shops, a new Nexus 7 later I was still nowhere further. Thanks to some great friendly advice I ran through the whole sequence and now I have an operational leaderboard!!! Yayy. Pay attention to the steps around creating the client and the SHA1 creation from your keystore etc. Good luck.
Yaaaaa! Good for you! I am too chicken to start I will do it when I had bunch of wine…how long did it took you? Great job! Mo
How long did it take… Not that long, each time. I ended up doing it 3 times altogether. First the attempt with debug SHA1, second one worked but I didn’t like the way it looked so had to nuke it and start over and third time’s a charm. Altogether less than an hour I’d say not including the time to read and research. You’ll be fine.
LOL! The more I read the instructions the more I get affraid! But I think it will be ok. I just need sometime. I may also have couple questions after reading those instructions. Just things that are little confusing at first. I will post them when I get there. Thank you Ksan. Mo
Here’s a module I made that handles logging in, posting to a leaderboard, and earning achievements. It works for both Game Center and Google Play, assuming that both have the same Leaderboard ID and Achievement IDs (Apple let’s you set these, so just copy the Google Play IDs).
This file assumes you’ve created the leaderboards/achievements in Google Play, and have set up your build.settings file accordingly.
local gameNetwork = require("gameNetwork") local this = {} local function gameNetworkListener(event) local targetAppStore = system.getInfo("targetAppStore") if event.data and targetAppStore == "apple" then this.isLoggedIn = true elseif targetAppStore ~= "apple" and not event.isError then local type = event.type if type == "init" then this.hasInitialized = true gameNetwork.request("login", {userInitiated = true, listener = gameNetworkListener}) elseif type == "login" then this.isLoggedIn = true end end end function this.checkAchievements(value, type) if type == "score" then if value == 500 then gameNetwork.request("unlockAchievement", {achievement = {identifier = this.achievement1, showsCompletionBanner = true}}) end end end function this.login() if system.getInfo("targetAppStore") == "apple" then gameNetwork.init("gamecenter", gameNetworkListener) elseif not this.hasInitialized then gameNetwork.init("google", gameNetworkListener) else gameNetwork.request("login", {userInitiated = true, listener = gameNetworkListener}) end end function this.initialize() this.login() this.category = "Leaderboard ID" -- Replace this this.achievement1 = "Achievement ID" -- Replace this end function this.updateHighscore(score) gameNetwork.request("setHighScore", {localPlayerScore = {category = this.category, value = score}}) end return this
Whenever my game starts, I simply require the file and call initialize(). It will prompt the user if necessary, or automatically log them in if they have done so previously.
Also, before I post a score or check for an achievement, I make sure that isLoggedIn = true. If not, call login().
if gameNetwork.isLoggedIn then -- Post a score, etc. else gameNetwork.login() end
Hopefully this will help you.
I use this in my game, Echo Evasion. Check it out! http://www.slatebit.com/echoevasion
Mo, will do. Just shout out. I’m not an expert by any means but having gone through it just recently I might be able to recall something that might help. Good luck!
@lKinx, thanks for your awesome sharing! This looks like a great module to serve this need.