2

I have an Android App I am building and I want to do something similar to what iOS does when you push a notification the app will launch in the background and perform a task then go back to sleep. I want to do this be cause I need to set a application value that tracks new content added since the last time the user opens my app.

So if I send 3 push notifications and 2 are notifying the user about new content in area "A" and the other is notifying the user about new content in a area "B", then I want to increment some application values every time a notification is received. Then when the app opens I can bring attention to the areas with updated content.

If there isn't a way to do this with push notifications I could always set up some sort of update reference table that my app would have to check upon opening to get the update counts since last launch.

Thanks, Fissh

gadildafissh
  • 2,243
  • 1
  • 21
  • 26

1 Answers1

0

Yes you can do this all.

  1. While you receive push at that place get all data and do operation on it for update.
  2. But first take care of that data should be store in preference because if you store in simple variable then it will erase after finish or close application so store data in preference and call this preference while you want to use this data.
Sameer Donga
  • 988
  • 9
  • 24