Omar Muhammed wrote:Let's say I have a simple service -launched by MainActivity- which is displaying a toast every x second. I know that my service will be killed if the user decided to kill MainActivity - which started it. What is to do if i want this service to keep running as long as the app is installed??!
well user want that if the app is killed so are the services! For security reasons. Would you imagine you close the app and a key logger is listening what you are writing?
the other way around is you have a mediaplayer and want to make the music playing if user switches to another application. in this case you are not killing the app. And this is the user case I suggest
you should adress