I am trying to implement something similar to Google Cloud Messaging and I have a working XMPP service on my phone and XMPP server configured.
Could someone please tell the architecture on the phone? How does android know when to show a notification for an incoming message? and when to update the application?
For Example, In Google Hangouts, when you get a new message, the notification is displayed and if the user is in the conversation frame, the conversation gets updated.