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
Post a Comment