B4A Library Google Play Game Services

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Thanks for the help Informatix

It works and I am a few hours, from releasing an update, to one of my games, with Leader-boards and achievements

MaxApps, I am getting the same error like you.
My Google Play Services version is 6.5.87.
I also did what Marcela Calixto suggested in post #34.
The problem persists.
How did you solve it?

Thanks.
 

paris7162

Member
Licensed User
Longtime User


I get this same error sporadically when updating AchievementLeaderboards. I've tried it on API 19 and API 20 with Google Play Services 6.1.xxxx. But for the most part this library works great.
 

Informatix

Expert
Licensed User
Longtime User
I get this same error sporadically when updating AchievementLeaderboards. I've tried it on API 19 and API 20 with Google Play Services 6.1.xxxx. But for the most part this library works great.
Are you sure that you quoted the right post? Because you cannot get the NoClassDefFound error sporadically unless you change the JAR file of GPGS between compilations (NoClassDefFound means that a class cannot be found in the library, and classes never disappear at runtime). I test my game on many (real) devices since weeks with API 19 and never encountered a NoClassDefFound error.
 
D

Deleted member 30048

Guest
I found an error. If you load or save a game and turn off the screen (or minimize the app) before the process of loading/saving are finished, when you turn on the screen again an error shows. The error occurs in Activity_Pause.

Is there any way to cancel the process of saving/loading?.

Because I don't speak English very well is very dificult to me explain this, here are an example.

Sub Activity_Pause
If SavingLoadingAreNotFinishedYet then
CancelSavingLoading
end if
end sub

Thanks!

Edit: I have the error in Activity_Pause. In your example the error happens on "main_sg_onsnapshotcreated"
 

Informatix

Expert
Licensed User
Longtime User
I found an error. If you load or save a game and turn off the screen (or minimize the app) before the process of loading/saving are finished, when you turn on the screen again an error shows. The error occurs in Activity_Pause.
What's the message? Could you provide a copy of your log?
Theoretically, it's your responsability that the saving and loading operations complete without issues whatever the user does with the device (e.g. you can prevent the screen from being off by acquiring a wake lock).

To cancel, I think you have to call the Cancel function of the GPlayPendingResult class (so you have to store somewhere the instance of the pending result returned by CommitAndClose) but I didn't test it.
 

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Do you use Java 7 to compile ? Check your javac.exe setting in your IDE ("Tools/Configure Paths").

My Java path is C:\Program Files (x86)\Java\jdk1.7.0_45\bin\javac.exe.
I have also checked the SHA1 key and it is OK. By the way, a wrong SHA1 will result in a different error (MISCONFIGURED).
Checked the package name - OK.
I even tried starting from scratch (i.e. creating a new game on google, with a different package name and SHA1 key. Of course I copied the new values to the games-ids.xml file and recompiled with the new package name and SHA1). I still got Error 0 Code 8.
I also read carefully and checked some of the suggestions mentioned in the stackoverflow discussion you posted previously - no luck.
I am now stuck with this error for more than a week, so any idea or suggestion will be appreciated.
Thanks.
 

Informatix

Expert
Licensed User
Longtime User
In Connection.Initialize, is the SavedGamesService parameter to True? If yes and you didn't add the Drive API in your console, then it's probably the reason.
 

Spinter

Active Member
Licensed User
Longtime User
Informatix@

for realtime I had from the connection with your library I could not use the realtime, perhaps something wrong but I can not interpret it all!
starting from the connection I was able to perform data exchange between two applications, remains correct some errors then posterolateral your code with the addition of my class always if you agree.
State code 50%
 

Informatix

Expert
Licensed User
Longtime User
I'm not sure of the meaning of your post.
 

paris7162

Member
Licensed User
Longtime User


I found an error that happens when one device is viewing the Leaderboard or Achievement Screen and receives a game invitation.

Here are the steps to duplicate error:

On Device 1
1. Sign into Google Play Services with Sign in button
2. Click the Achievements Button

On Device 2
1. Sign into Google Play Services with Sign in button
2. Click the Invite button
3. Invite Device 1


When you click out of the Achievement screen using the arrow on top or the back button, the following error will occur.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…