Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More of a question... #3

Open
KennyGoers opened this issue Aug 17, 2017 · 1 comment
Open

More of a question... #3

KennyGoers opened this issue Aug 17, 2017 · 1 comment

Comments

@KennyGoers
Copy link

Is being exported really a requirement? I have a running service is O and didn't set the exported flag and it appears to be running fine, is it situational?

@MinceMan
Copy link

I'm guessing this question is about JobScheduler. It's all about how your service is started which determines if you have to export (make it visible to the rest of the device/system) or not. A JobService is started by the system so I'm pretty sure that you have to export it. If you have a service that you start within the app then you do not have to export it.

The O background limitations are another beast. You can start a background service if your app is in the foreground and for up to 30 seconds (do not expect this time) after your app has been backgrounded. After that your services will be shutdown. If your app is not in the foreground you more or less have to make your service a foreground service with a notification. Registering with the Job scheduler is the supported way around this problem but not for long running operation (do not use it to display music controls). Unless you are literal an alarm/timer/clock app you should not use AlarmManager as it is deprecated by the system for any other purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants