0

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?

3
  • 1
    how abot trying GCM (google cloud messaging) Commented Feb 27, 2013 at 9:08
  • 1
    Periodic service: what is your business goal? Time after which an update is required? Every second request might end up blocking you from server side. Commented Feb 27, 2013 at 9:19
  • It should be a realtime app Commented Feb 27, 2013 at 9:41

1 Answer 1

1

Use GCM, anything else will waste power.

This will send your Application an Intent when your server tells Google to do so.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for GCM suggestion, didn't know about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.