broadcast message to all users

0 votes
hi.I'm developing a game where each user sees the list of all online users. The problem is when a new user connects, how to let other users get notified of this and update their list? Also when a user bgins a game theirs status should change to playing. Is there an api for these kind of broadcast messages or should I use sendChat api?

thanks.
asked Feb 25, 2015 in AppWarp by Arash Shahzamani (25 points)

1 Answer

0 votes
 
Best answer
Hi Arash,

When a new user joins a room , all the subscribed users get the onUserJoinedRoom callback in the registered NotifyListener from where you can get the username of the player who joined the room.For this you will have to register the NotifyListener while initializing the WarpClient object.Subsequently, all the players can update their lists.

If you are making a Turn-Based Game,whenever a user starts the game, the result of the request is provided in the onGameStarted callback of the registered TurnBasedRoomListener.The result is a byte depicting the status of the request made.Likewise,you can maintain the state of a player when he/she starts a game.

Thanks
Kanika Mittal
AppWarp Team
answered Feb 25, 2015 by kanika mittal (50 points)
selected Feb 25, 2015 by Arash Shahzamani
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...