Many messaging apps now have a feature that the icon displays something like a small counter on the icon indicating that there are new messages, even when the app is closed. Additionally, the user can manually turn this service on/off.
I would like to recreate this functionality. My best guess is that there is a background service running with a Timer in it (similar to creating a Timer and Tick event in the Starter section) that routinely checks a remote server for unread messages and, given new messages, updates the icon (I'm guess that the service is either a Foreground or Stick service). And, the user has the option to turn this background service on or off.
Does anyone have an example of how to do something like this?
I would like to recreate this functionality. My best guess is that there is a background service running with a Timer in it (similar to creating a Timer and Tick event in the Starter section) that routinely checks a remote server for unread messages and, given new messages, updates the icon (I'm guess that the service is either a Foreground or Stick service). And, the user has the option to turn this background service on or off.
Does anyone have an example of how to do something like this?