I need to realize an Android app that receives notifications from a website/web service.
I think to write an Android service that can run in the background. To be able to receive messages. I don't know the best way to handle it. Is it better to poll every n seconds the server or is there a better solution like a Broadcast Receiver for custom messages?