I've finally made a game that I am happy to push on the android store and I have everything down packed except for a few minor details like implementing the leader board and achievements.
Now, I've followed the tutorial on the video produced by Bruno and Dan and have been able to sign in with multiple devices and multiple accounts, but nothing else seems to work.
I'm using unity and the plugin / sdk that was provided and told to download.
The things I am having trouble with is even getting the achievements and leader boards. I am using this code which was in the video:
// post score 12345 to leaderboard ID "Cfji293fjsie_QA")
Social.ReportScore(12345, "(I have my leader board code here but am masking it for safety)", (bool success) => {
// handle success or failure
});
In that code I have it basically setup for the moment with testing that if a GUI.Button is pushed, the player will send the score 12345 to the leader board. Then once that is done, there is another button that can open the ShowLeaderBoardUI function that was also given in the video.
Once in the game on my phone, the scores wont show up, or the leader board itself once pressing the button either.
Am I doing something wrong? I'm not sure if I need to include anything else and I'm not even inputting my variables of score into the leader board yet for testing purposes.
If you need anymore information let me know.
I have the game in Beta on the Google Play Store with the application saying "Published", the Game Services say "Published". I have linked the app to the Game Services with the correct OUATH 2.0, with the correct App ID. All achievements and leader boards say "Published". Both of my email accounts are linked to the Game Services.
I'm just not sure where I have gone wrong and why I can't even ShowLeaderboardUI or even post a score.
Also is there a way to view the leader boards and achievements on a computer as apposed to a phone? or do I need to be on the phone to check them?
Thanks,
Chris
EDIT: Forgot to include that I can sign in and have all of the regular Google Play sign in graphics and it's signs in fine.
EDIT2: Forgot to mention that the game is in Beta in the Google Play Store.
For what it's worth. I wasn't able to get Google's plugin to work, so I deleted everything google related in my project and installed this.
https://github.com/faizann/UnityGPGPlugin
Authentication works now, as well as reporting scores to the leaderboard. So it would appear that the issue actually lies with something in Google's plugin and not my setup on the developer console.
Add the following statement before Authenticating the local user.
PlayGamesPlatform.Activate();
this will solve your issue
I have had the same problem as the OP and tried to solve it for days.
I could signin normally, but when calling ShowLeaderboardUI, ShowAchievementsUI or pretty much anything else, it did nothing.
What solved my issue was removing Facebook and Playfab plugins I had installed on my project. I reinstalled Google Play Games plugin and everything went fine.
Related
Inb4 its a duplicate, I know the question is, but they are all older and none seem to help with my issue. Mine seems pretty cut and dry. I have an app that I build with a set of keys and upload to my play console. I have "google signature" enabled so they sign my apps as well. I have products enabled that work when the app is downloaded from google play test track. The SAME EXACT CODE BASE, signed with the SAME EXACT SET OF KEYS I used before uploading to the Play console does not work when I build locally and push it to my device. It says "This device is not configured for transactions" or something along those lines. I'm trying to build out my purchase flows but this is really obstructing me...
Everything is set up according to other answers. Same version code, products active, test track/alpha release are both available. Hell, the purchase flow starts fine when I download the apk from the play store, just not when debugging in AS.
I don't think this is a true answer, or maybe it IS and my symptoms are a bug on googles part, however I seem to have resolved my issue. I'll confirm my answer if this continues to work throughout the day.
For anyone else having a similar issue to me, delete all storage/cache for the app on your phone, then delete the app (NOT USING THE PLAY STORE). Now, install the app from your internal test/alpha track (FROM THE PLAY STORE). Run the app, test the purchase. If it works, close the app and delete all of its storage/cache and the delete the app (NOT USING THE PLAY STORE). At this point you should be able to upload test builds to your devices using Android Studio and have inApp transactions work. Idk why or how this works but YOLO, If it continues to work ill come back and verify this answer. Hopefully this is something google can get streamlined, or maybe I'm doing something wrong and just don't know it. Feel free to answer and I can change my correct answer.
I have a issue when using Game Service of Google. I use Leaderboard and Achievement in my game. But when I run direct from PC to Device, all things is normal.
But when I export apk file and upload it on Goole Play, I got a issue in below image.
Please check the given quality checklist which is presented with minimum requirements, best practices, and good-to-have enhancements to deliver the best possible product to your players.
In addition to that, since nothing shows in logcat, you may also try going through these references and/or tutorial:
Troubleshooting Issues in Your Android Game
Google Play Game Services: Leaderboards
I did a little Unity game and I wanted to include on it Google Play Services with some achievements. I have created the achievements and so on. However, seems that it is not working, mainly the first point is that is not logging correctly to Google Play Services. Here you have the code I'm using:
http://s27.postimg.org/9epuz81sz/codigo_conexion.png
Then, I have noted, something suspicious, seems that the app in Google Play is not asking for Internet access (you can check it here):
https://play.google.com/store/apps/details?id=com.marcos.spaceshooter
So I guess that somehow I must say in some place of Unity that I need this permission. Right?
But, there is also another strange point, if I look in Google Play Games. The game is not showing the Achievements. However, everything is published, you can check it in Google Play games if you download the game.
Anyone knows how to fix this issue?
lot of thanks in advance
From your code it looks that you're trying to login and then activate the plugin. That's wrong reverse order. Try placing InitializeInstance and Activate functions in Start() function before Social.localUser.Authenticated(...). If it doesn't help, please post Logcat logs.
I'm a newbie in android programming, having started a few months ago only. I've always found an answer to my questions up to now, but this particular one seems not to exist. I may be missing something obiouvs but I try to ask anyway.
I'm dealing with google play services implementation in the game I'm developing. I set everything up following step by step more than one guide. They were similar and the resulting code was the same. And it's working fine: I can log in and connect to API's with GoogleApiClient. I set up the achievements and leaderboards in the console and I can even update them and unlock achievements.
The problem is I can't see any of my achievements or leaderboards in the Play Games app by Google. From the console they result published but in the app, if I click on my game, I'm only able to see the description and "other people using this game"; achievements and leaderboards section are missing and I can't figure out how to make them appear.
I want to underline that if I call inside my app the leaderboards or achievements activity, provided by the google play services library itself, it works. The intent is launched and achievements show up (same thing for leaderboards). So I thought the problem was outside my game code.
So, what am I mistaking? Do I have to change something else in the developer console? Do I have to add something else I didn't notice?
Thanks in advance to everyone who will help me.
This is normal behavior, it wont show up in the Google Play app until you have published your game.
I have faced the same problem and it showed up as expected when the app went live.
So, finally here the answer to that issue. I directly wrote an email to Google support. I was told, they have a kind of activity threshold for each app. Once you hit that, you will see 'MyAchievements' and/or 'Leaderboard' tabs in GooglePlayService app.
So my app Hardy the Game finally got at least the achievements activated.
Obviously you have to publish the game and do every step required as explained in Google Play Game Services.
Of course you can immediately use your achievements/leaderboards programmatically. Actually, you should do!
For getting those extra tabs just wait and get your app more activity. In my case I developed all achievements and started to share with my friends.
Hope that helped!
Good Programming
i have been really wanting to create a real-time multiplayer android game and was following this tutorial:
https://developers.google.com/games/services/android/realtimeMultiplayer
I even corrected the errors on the ButtonClicker example(it's the only one with real-time multiplayer) and got it to work, but didn´t test the multiplayer yet. I copied the whole project to my brother´s computer and he tried to play with me. But every time he click on the button to invite me, it´s saying "the project is incorrectly configured". Does he have to generate another aplication id? has anyone tested the example using 2 different computers and the android emulator of eclipse?
Google Play Services aren't typically installed on the emulator. I think you'll need a pair of actual devices.
It might also need signed applications, but I'm not that familiar (yet) with the Google Play Services model.
I think i resolved it(at least my brother could login on his computer) by adding testers to my project on google play development console. Now all he needs to do is use another emulator on his computer to emulate multiplayer, just like i did ^^
if its giving you an unconfigured error, double check that you signed your app with the same certificate as the sha1 that you linked.