Crashing at the authentication point
Opened this issue · 3 comments
Hi.
So yesterday I spent all day trying to figure out why the plugin is crashing when I try to use the code from the scoremanager script that was provided.
I tracked down the issue to the initialization of the google play class (com.reignstudios.reignnative.GooglePlay_LeaderboardsAchievements).
Here is when the cs script wants it:
And here is a view inside the class:
Now I dont know much about java classes but surely there must be a GooglePlay_LeaderboardsAchievements.class inside that jar file right??
Anyway, somehow it gets past that part and then at the authentication part it crashes. If I comment out the following line, it doesnt crash but of course nothing else happens because you need to be signed into googleplay to get leaderboards and achievements
Any help would be very much appreciated! Otherwise the plugin works fantastic for iap. An alternative that I thought about was to just use the default google play plugin instead of your one but that causes android manifest conflicts :/
Thanks for reading and hopefully we can fix this problem within the next day!
If its failing on "native = new AndroidJavaClass("com.reignstudios.reignnative.GooglePlay_LeaderboardsAchievements");" then "native.CallStatic("Init", desc.Android_GooglePlay_DisableUsernameRetrieval);" probably isn't being called and in turn would cause "native.CallStatic("Authenticate");" to fail.
I would test on different devices if you have them. Also what is the C# exception you're getting?
Also you don't need to use a decompiler all the java source code is located in places like: https://github.com/reignstudios/Reign-Unity-Plugin/blob/master/Native/Reign.Android/Native/ReignPlugin/reignnativegoogleplay/src/main/java/com/reignstudios/reignnative/GooglePlay_LeaderboardsAchievements.java#L86
I just tested it on another device and the same thing happened. I don't think this isnt related to my device of choice.
Aha I didnt know I could see the java code there...
Thing is...I'm on 4.7 free so I dont have the profiler to tell me what went wrong so I cant tell you what c# exception I'm getting.
Anyway, I'm going to save both of us from a headache and just buy the Cross Platform Native Plugins - Ultra Pack from Voxel Busters and call it a day.
Sounds good. FYI you can get the exception. Just print out Exception.Message and Exception.StackTrace. Then look at the Android logcat.