f.khantsis
f.khantsis

Reputation: 3560

How do I send live updates to my Android device?

I want to send live updates to a phone to my app, approximately 1KB/sec. It is acceptable, if for reasons of power management, the updates will come about once per minute in batches, since Google advises that what drains the battery is leaving the radio on, and that a radio drops power after 15sec. What is the appropriate tool to use?

  1. Websockets/stomp. That's what I am already using for the browser client. However my worry is that it will keep the radio on, and devastate the battery.
  2. Google Cloud Messaging. Google promises that it's battery efficient, however how live is it? Who controls the frequency of pushes? Is it designed for a lot of data? Does it have to put notifications up for every push which would be highly undesirable to me since it's a push every second.
  3. Amazon SNS. I already use Amazon AWS, so it may fit the profile well. How good is it with power management?
  4. Something else that I don't know of

Upvotes: 2

Views: 292

Answers (1)

mjn
mjn

Reputation: 36664

There is now https://firebase.google.com/docs/cloud-messaging/

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost.

and

For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.

FCM is the new version of GCM under the Firebase brand. (read more about FCM v GCM and limits and pricing)

As you write

the updates will come about once per minute in batches

the server could send a notification if a new batch is ready, instead of every second.

Instead of transferring the payload with the notification, the app could use a HTTP(S) connection to get the payload. This would allow to download all updates in one batch with one HTTP request, which might be more efficient (less overhead).

Upvotes: 2

Related Questions