On the 0.9.41 version, 0.9.40 version, and 0.9.38 version, when I try to show the leader board with Social.ShowLeaderboardUI (); nothing happens. I looked at other issues, and I tried doing what they said to do. I tried different versions, I tried uninstalling and reinstalling the plugin, checking my manifest file. Nothing seems to work, but when ever to authenticate the user with Social.localUser.Authenticate (success => {}); it works.I'm not sure if this is a problem with unity, google, or me.
Same issue here. I can't believe that you guys released a broken plugin! Everyone seems to be having this same issue. I also tried adding the activity "com.google.games.bridge.NativeBridgeActivity" at no avail... This is so frustrating, I spent 2 days with this. Please provide a fix asap!
Same issue also here. After spending 3 days I decided to wait for next plugin update.
I added the activity like it was said in here and it worked for me. Although I'm using my own manifest, because Unity ignored the Google Plays manifest when merging, so I had to overwrite it with my own manifest.
To see your manifest that has been generated after you have built the apk, you have to go to: Unity Projects\YourGame\Temp\StagingArea. The manifest with "-main" is the Unitys manifest and the other one is the one that got generated by merging the "-main" manifest, Unity ads manifest if you are using that and Google Play manifest. To overwrite manifest see here.
@YoloSwaggings720 So I should go to leaderboards in the google developer console, get the resources, make my own xml file, add what you added to your xml, then save the xml and override the xml that unity automatically creates?
i have this same issue
@emeahonen
Please see:
https://github.com/playgameservices/play-games-plugin-for-unity/issues/1940#issuecomment-333457658
for the android manifest fix up
@DerpyMan101
Is your log in flow working? Because if yes, then you just need to add a line in the googleplayplugin android manifest. See above comment for the fix
@supersolid-Justy Yes my login is working
and the line in the manifest from #1940 is in there too?
@supersolid-Justy Yes, and still not working.
@supersolid-Justy
Same case here, I added the NativeBridgeActivity activity to the AndroidManifest.xml and doesn't work either. I'm 100% sure that I have added it in the right place. Actually I'm generating the APK, unzipping it with apktool, updating the manifest, creating the apk again, signing and aligning it. Everything works except this... Please provide a fix asap.
hm..Im not sure about this one as I never had this issue myself. Is a leaderboard setup already for the game in the google play console?
In my case, yes I have the leaderboard defined in Google Play, and login works and scores are updated. Actually everything was working fine with version 0.9.40 of the plug-in. As soon as I upgraded, the leaderboard stopped being shown...
And what's very weird is that if I go back to 0.9.40, the issue persists! I can't make it work. Please provide a new plug-in fixing all this crap asap!
@supersolid-Justy, the solution from #1940 is not working for me. I'm sure I have the activity defined in the AndroidManifest.xml, however the leaderboard is not shown.
I have more details on this. In the logcat, when I try to show the leaderboard, I get the following warning:
10-04 11:42:55.781 3647-4932/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10330 but it is really 10140
java.lang.RuntimeException: here
at com.android.server.AppOpsService.getOpsRawLocked(AppOpsService.java:1356)
at com.android.server.AppOpsService.checkPackage(AppOpsService.java:1035)
at com.android.internal.app.IAppOpsService$Stub.onTransact(IAppOpsService.java:169)
at android.os.Binder.execTransact(Binder.java:573)
Do you know what could be happening? I found here and here people telling that it's harmless. But the thing is that the leaderboard is not poping up, and I don't see any other error in the logcat... Please advise.
Thanks.
Let me add that after the warning we see the following error in logcat:
10-04 11:42:55.825 15448-15606/? E/GamesNativeSDK: Trying to show UI while waiting for a result from an existing UI. Please ensure that OnActivityResult is forwarded to the Games C++ SDK from your Java activity. See android_support.h for more details.
Have you tried mixing the latest Admob plug-in with the latest Google Play Games plug-in? Admob uses play services libraries version 11.4.2, and Google Play Games by default suggests 10.2.1, so maybe the issue is this mix? I'm keeping the latest version 11.4.2, and can't make it work, no matter if I use 0.9.40 or 0.9.41...
I am not using Admob, so dont know whats happening here. other people suggest that sometimes the wrong androidManifest is being merged into the apk, so maybe unpack it there and see if the solution from #1940 is in that AndroidManifest. i do have a 11.2.0 version of the libraries and everything still works for me, so maybe try a lower version of google play services? At least the 11.2 and see if its defo not the updated library
Currently having this issue. Tried changing the manifest, tried redoing the credentials and linking, pretty much everything and get the same logs as above.
Okay, after about two days I got it to work. I had to put the AndroidManifest from GooglePlayGames in the Assets\Plugins\Android\ folder which seemed to fix the merge issue. However, I've since deleted it and it merges correctly now. The rest follows:
First, I deleted the OAuth project and started a new one and changed the resources in the GooglePlayServices setup in unity.
Second, I did as above in #1940 adding the activity to the "Assets\GooglePlayGames\Plugins\Android\GooglePlayGamesManifest.plugin\AndroidManifest.xml"
Third, I re-added the GooglePlayGames plugin which added the Google.IOSResolver_v1.2.48.0, Google.JarResolver_v1.2.48.0, Google.VersionHandlerImpl_v1.2.48.0, play-services-resolver_v1.2.48.0, Which got deleted as obsolete because I had v1.2.52.0 of all the above. So I deleted the v1.2.52.0 and kept the v1.2.48.0.
Doing all of these things fixed the leaderboard not showing up. I'm not sure if all of this is relevant but if I mess with anything and don't have everything in place as above then the leaderboard doesn't show.
Hi, I had the same trouble, I found the AndroidManifest.xml file in this path "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Apk" I edited and added the next tag
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
Then saved the file (administrator perfil required), I builded the apk again and woala, It works. Try it and let me know if you could.
Regards.
Thanks everyone! Finally solved the issue applying a little bit of many of your suggestions. Thanks!
@supersolid-Justy also for me the Manifest fix doesn't work. By running "Social.ShowLeaderboardUI();" nothing happens. With the 0.9.39a version the app was crashing everytime at startup. With the latest version, the app starts properly, makes the login to GPG, but doesn't show Leaderboard. The Leaderboard is set up correctly in the Developer Console.
@robbitara and everyone, let me share with you my files code...
AndroidManifest.xml
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<application
android:theme="@style/UnityThemeSelector"
android:icon="@drawable/app_icon"
android:label="@string/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
In order to show the leaderboard use the next command instead of Social.ShowLeaderboardUI();
PlayGamesPlatform.Instance.ShowLeaderboardUI ("YourIdLeaderBoard");
And if anyone need it, in order to show achievements use this one:
PlayGamesPlatform.Instance.ShowAchievementsUI();
I expect these code parts works for you.
Regards
In order to show the leaderboard use the next command instead of Social.ShowLeaderboardUI();
PlayGamesPlatform.Instance.ShowLeaderboardUI ("YourIdLeaderBoard");
I did it, but nothing has changed. The only thing I don't know how to do is to modify the AndroidManifest.xml.
I added this two lines of code to the AndroidManifest.xml placed in Assets/GooglePlayGames/Plugins/Android/GooglePlayManifest.plugin/
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
But this didn't fixed my problem at all. I don't know if I'm doing it right, because I have never dealt with an Android Manifest and how it works.
Could updating the SDK eventually help?
This is fixed in 0.9.42
Hey guys,
I have spent days figuring out what is wrong with leaderboards, I have followed tutorials here from GitHub, Unity answers but without any success.
I have built the apk and transferred it to my mobile device, although login worked properly, after I tried to use button which had Social.ShowLeaderboardUI (); method attached nothing worked.
Finally after 3 days without success I have decided to publish the apk to alpha and suddenly everything started to work.
Also I have signed the app with upload key, published in google play services, also added activity to manifest, which is suggested above (although I am not sure what made it run but try everything and it should work).
Good luck,
also if you find this advice useful please try my game,
here is link to android store:
https://play.google.com/store/apps/details?id=com.HOTBBQ.MarshatheMarshmallow&hl=en
Most helpful comment
Same issue here. I can't believe that you guys released a broken plugin! Everyone seems to be having this same issue. I also tried adding the activity "com.google.games.bridge.NativeBridgeActivity" at no avail... This is so frustrating, I spent 2 days with this. Please provide a fix asap!