Job cancels upon app exit or phone reboot
See original GitHub issueI know someone has asked this before, but I still think it is a bug.
I want to run a Job once a day. The job includes the logic to do a query and then show a notification window to the user. I use the following in my presenter.
new JobRequest.Builder(TAG)
.setPeriodic(getReminderInterval())
.setPersisted(true)
.setUpdateCurrent(true)
.setExtras(args)
.build()
.schedule();
I found that unless my app is running or in the background, the job gets cancelled, which is pretty likely. So the following scenarios causes the job to cancel:
1/ user swipe away the app in Recents 2/ user backgrounds the app and restarts the phone
What’s the proper way of using this library so that I can in fact execute some code on a daily basis as the FAQ suggest?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:17
Top Results From Across the Web
How to stop jobservice when the user exits/closes the app?
I am planning to do stop/cancel the job in onStop activity lifecycle method. But how do I make sure that the job is...
Read more >Problem: Unable to cancel a job in ArcGIS Pro - Esri Support
Force closing ArcGIS Pro does not cancel the job as the sharing process restarts after reopening the application.
Read more >Quit and reopen an app on iPhone - Apple Support
To reopen the app, go to the Home Screen (or App Library), then tap the app. If quitting and reopening the app doesn't...
Read more >Pause, cancel, or exit a migration - Google Help
When you use the data migration service, you can pause, restart, cancel, or exit a migration. You must be signed in as a...
Read more >Schedule tasks with WorkManager Part of Android Jetpack.
WorkManager is intended for work that is required to run reliably even if the user navigates off a screen, the app exits, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, it’s decided at runtime.
AlarmManager runs in background even app is killed from recent history.