I'm developing an app that needs to keep running a background service. That's why I start that service on the onCreate method of the Main Activity.
But what I'd like to do is that service be always running, even if I didn't start the app after a device restart. I know there's a permission that I could use that is called "ON BOOT COMPLETED". i could capture that Broadcast, I know.
But I don't want to ask user for that permission.
What should I do? The app Fucking Weather has a Service always running and in its Manifest it doesn't declare the "ON BOOT COMPLETED" permission. How do they do that trick? That's what I need.
I tried an AlarmManager that executes every X seconds, but it won't start until the app is not open.