Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
How to run a never ending foreground or background service in android studio
posted 1 month ago
I am new to android and I want to develop an android app to notify events from an IoT device module to user.
For example whenever the door opens, the modules report it to the server and then server sends this event to the user's app to notify him/her.
Therefore I need a never ending foreground/background service in my app which runs continuously.
It can be stop only when the user go to settings>>apps and press the one of "Force stop" or "Uninstall" buttons.
I have explored the web for a great deal of time and there was a lot of similar pages, but I couldn't find my answer.
Happy to hear your answers.
brevity is the soul of wit - shakepeare. Tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
Boost this thread!
Service being destroyed?
Help with phone state listener inside foreground service
Services, in web, concurrent and all?
Listening socket connection
How to remove application shortcut from home screen on uninstall automaticaly?