Thursday, 15 January 2015

android - How to detect if client intentionally left Room in Google Play Games Real-time Multiplayer? -



android - How to detect if client intentionally left Room in Google Play Games Real-time Multiplayer? -

here multiplayer game , need display 2 notifications player: first when challenger disconnected due networking problems, , sec - when left game intentionally. room created auto-match criteria (max players - 2). , each time when 1 of players left game due network problems or intentionally roomstatusupdatelistener callbacks called in next order: ondisconnectedfromroom, onpeerleft, onpeersdisconnected.

so show notification in ondisconnectedfromroom callback, problem can't observe if network problem happened challenger or left intentionally. participant.getstatus() returns status_joined.

so, how observe if client left room intentionally?

thank in advance!

you can send game info between clients. in case player wants left game, send message specific user disconnect other players.

best whishes, steve.

android google-play-services multiplayer google-play-games

No comments:

Post a Comment