android - Google play services simple chat implementation? -


I'm looking to create an extremely simple chat feature for my app.

I just want to send a message to the opponent in my turn-based multiplayer match.

I do not want to use libraries like scorpio and do you have any way of implementing it?

I have tried to use the games. Realtime Multiplayer SendLevel Message () But my players are not in the room, so it does not work. In the search of the API it appears that the only way to send data is to callTurn

To take a turn, use this method:

Method Description Lieutenant ()

Your game should only invoke this method after applying this method to the active turn-based match of the user, the user sees this match under their turn list in the list of matches in the UI is. If a participant ID is specified in the method call, that partner becomes the current player and can run a turn. This is the first time with an inviting player, the player receives an invitation notification, after that, the player receives a turn notification if any pending partner ID is not specified, the match status is changed to MATCH_STATUS_AUTO_MATCHING. Your game can only unsubscribe the participant ID, if there are players slots that are still empty for automatic matching, your game can call LeThino () with the current player as a pending partner. In this case, game games Game data is uploaded to the services but no information is sent.

There are no other calls that change the data kept in the server and the other player (s).

Now, it is being said that, it is currently possible to send a chat to the player who is currently the owner of the turn, it appears that there are two ways to do this, either join the chat And set up the next participant to the next participant ... or just update the chat part, and then call the current participant participant with a set up partner. Looking at the documentation, it will then update the data placed on Google's server, but this update will not have to send any information, as it appears that the notice is only being sent if it is actually a player To inform that this is their turn (If you imagine your app being open, while the player was waiting to complete another, then it could use getData () to get the data, because there is no need that I It can look for the player's request for the data request ().

This will allow a player to chat, but not the real time as you mention ... because the API strictly ON from Land.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -