Best way to implement background comunication with server using Firemonkey?


I working on application that has to communicate with a server every few minutes, while the app is off, to check if there are new messages for it. If new message is awaylable, a notification must be shown.

For now stick to this workflow: A application starts a background service. A service on start connects to server to check for messages, then sets AlarmManager to activate the same service after few minutes and then service stops itself. And so on.

Have managed to implement something like this, but not sure if this is the best way to go.

Comments are closed.