How can my Android app react to a push notification and download data in the background -


i'm looking make app more responsive having automatically download data (around 10kb) when receives notification. 2 options (i think) are:

  1. try , pack info need 4k payload limit - may possible, wouldn't ios/wp implementations, have lower limits. pretty inextensible, , i'd need hand-craft messages.
  2. send notification app react , download data in background.

if it's going 2, can that? can done when app isn't running in background or foreground?

for updates i'd show notification user. can done in same notification, or need push one?

any similar info ios appreciated, not essential answering question!

when using google cloud messaging create broadcast receiver receives gcm push notification. broadcast receiver can either handle notification on own or start intent service (which better suited logic downloads data server, since runs on separate thread, , doesn't block main gui thread). can display notification , download data server result of same notification.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -