java - Checking for updates from network continuously - how? -


when phone receives text message, upload database. on tablet should notification new message possible.

how efficiently check new messages database? don't think background process queries database every few seconds efficient @ all. drain battery , it's huge waste of network.

have static broadcastreceiver in app listener. if text message comes in receiver started , onreceive() called. can invoke service/ activity save database , put notification.

here's nice tutorial started.


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -