Android: running the application in the background

Hi,

I am trying to allow my user to close the application, but still maintain a connection that listens for events. The icon should appear in the status bar, and when the user clicks on the notification, they return to the application.

Any ideas on how I can do this?

Thank you very much in advance,

+6
android notifications
source share
2 answers
+4
source share

Use Service , a Notification and startForeground() . Here is an example application from one of my books demonstrating this technique.

+9
source share

All Articles