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.