Android Question Google Play services lib error

Bas Hamstra

Member
Licensed User
Longtime User
I am still trying to run the Button Clicker, set up the app on 2 emulators. Both succesfully sign in in G+ with different accounts (one extra tester account set up in developer console). Ok reconstruction:

1. Show friends works (shows the other account)
2. Invite works, sent and received
3. On accept invite the inviter receives that invite was accepted

Then when both friends join the room (some P2P connection is set up behind the screens?). And THEN apparently some handler is missing and both apps crash GoogleServices, see log below:

When I set the app up in the developer console, I flagged "Realtime" could that be the cause? Anyway see the log below: can you give me a clue?

(I see onP2PConnected is a method in Google documentation, could it be missing in the lib?)

Many thanks for ANY help!

Kind regards,

Bas Hamstra




Room is created
-1
2:size with (ArrayList) [b4a.game.helper.ParticipantWrapper@417584b8, b4a.game.helper.ParticipantWrapper@416f0de8]
Got past suspect line
** Activity (abuttonclicker) Pause, UserClosed = false **
java.lang.AbstractMethodError: abstract method not implemented

at b4a.game.helper.RoomConfigWrapper.onP2PConnected(RoomConfigWrapper.java)
at com.google.android.gms.internal.au$w.a(Unknown Source)
at com.google.android.gms.internal.au$w.a(Unknown Source)
at com.google.android.gms.internal.k$b.D(Unknown Source)
at com.google.android.gms.internal.k$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
** Activity (abuttonclicker) Create, isFirst = true **
 

Bas Hamstra

Member
Licensed User
Longtime User
Anyone please? It seems if only 1 or 2 methods are added to the lib we have a really interesting FREE multiplayer platform available. WITHOUT the need to setup a homeserver. Am I the only one that thinks this is AWSOME? I have a game I want to make multiplayer.

Kind regards,

Bas Hamstra
 
Upvote 0

Bas Hamstra

Member
Licensed User
Longtime User
I suspect with 2 close IP adresses in the same homenetwork, with "joinroom" Google sets up a P2P connection between the 2 and calls the OnP2PConnected handler when done. This OnP2PConnected handler is missing in the lib. I checked the sourcecode "Roomconfig.java" and it's just not there. Which is strange because all the other methods are there.

See below the Google docu about what's missing in "RoomConfig.java" source code of the lib (see the attachments to NFOBoys tutorial):
abstract void
onP2PConnected(String participantId)
Called when the client is successfully connected to a peer participant.
abstract void
onP2PDisconnected(String participantId)
Called when client gets disconnected from a peer participant.

It might be that others (including NFOBoy himself) are not getting this error, because they did not test the Buttonclicker demo on 2 close IP's on the same network. Then Google might chose other ways of connecting players to a room and the above handlers are not hit.

Is there anyone who could add these 2 methods to the wrapper/lib, please? Erel? I myself know nothing about Java and am terrified of Eclipse (have not even set it up).

Any response on this would be immensely appreciated..!

Kind regards,

Bas
 
Upvote 0

Bas Hamstra

Member
Licensed User
Longtime User
Anyone please? Why is there zero response. NFOBoy has said that further developments of the lib are welcomed as long as improvements remain available for the community.

Bas

NB: Google Play services is the Google counterpart of the Apple Game center. Both are important libs that will provide Multi Player funtionality to Google servers (no need to set up home server).
 
Upvote 0

Bas Hamstra

Member
Licensed User
Longtime User
Is there really none interested in multiplayer functionality? So many libs but no core google multiplayer lib?

Disappointing...

Bas
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I too would like to be able to use the Google Play Services multiplayer capabilities, but I couldn't get it to work properly with the wrapper. In the end, I just set up a 2 player game using IP sockets on a local network. It works well on the local network, but with 400+ players submitting scores to the Leaderboard, I'd love to be able to offer multiplayer games via Google Play Services.
 
Upvote 0

Bas Hamstra

Member
Licensed User
Longtime User
But the lib is sooo close! I managed to succesfully log in and sent/receive invites. Seems only 2 little methods are missing...! Once these 2 are in place players can actually connect to each other (in a 2 player room) and send/receive messages to each other. For example gamemoves. Which is what I'm after...

Kind regards,

Bas
 
Upvote 0
Top