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,
I think you want to implement a service. http://developer.android.com/reference/android/app/Service.html
Use a Service
, a Notification
, and startForeground()
. Here is a sample application from one of my books demonstrating this technique.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With