I am asked to build an Android app, that receives an input from a "central station", and gets alerted, like "please respond immediately ."
I'm new to Android programming, so I have no idea how to get such a "live" input, so any help will be appreciated.
This question has two parts. The first part is up to me, I guess. But still important in finding the right path.
1) how will the "central", alert the user? I have two solutions in mind for now :
1.a.) The central can insert a database entry to the server, and the app constantly (1 per minute) sends requests to a php file, and asks if there is an entry with id=my_id , and status="unread".
1.b.) The central sends an SMS to the device, and my app listens to the incoming SMS messages from that number.
and the important part :
2) How can I make sure that the device gets "alerted", even if the user has closed the application ?
Thanks for any help!