User1578
User1578

Reputation: 628

What is the best practice for implementing smack into an android app?

I'm writing an android game that requires push notification. I've got the aSmack library imported and working, but I don't know how to implement it efficiently to achieve the following:

1.) Each player should be notified when the other player makes a move. 2.) The server should be notified each time either player makes a move, in order to avoid any cheating (such as one player making two moves in a row, etc.)

I've got openfire and aSmack connecting with each other. I need to write a server side program to handle the server-side. Should I put the two users and the server in a group chat? Would it better to have three individual chat sessions?

Upvotes: 1

Views: 924

Answers (1)

Flow
Flow

Reputation: 24053

I think you want to take a look at XMPP Pubsub.

For C2DM: IIRC it won't suit your use case, as it provides no back channel (only push TO the devices are possible)

Upvotes: 1

Related Questions