Reputation: 10022
Greetings,
I'm trying to allow my user to close the app but still maintain a connection which listens for events. An icon should appear in the status bar and when the user clicks on the notification, they are taken back to the app.
Any ideas on how I might go about this?
Many thanks in advance,
Upvotes: 6
Views: 8971
Reputation: 1007534
Use a Service
, a Notification
, and startForeground()
. Here is a sample application from one of my books demonstrating this technique.
Upvotes: 9
Reputation: 2244
I think you want to implement a service. http://developer.android.com/reference/android/app/Service.html
Upvotes: 4