Reputation: 1001
Android documentation does not clearly tells about what and how a work manager runs a work.
1. Does Work Manager
start the application
class so that initialization for some classes can be done or i have to manually initialize them in my Worker class.
2. Does It run on application process
or it runs on another process
?
3. Periodic work is not running if my application is killed. Why is that?
Upvotes: 4
Views: 1197
Reputation: 566
It store the jobs in a local database and tells the OS
to run them using JobScheduler
or gcmNetworkManger
or AlarmManger
depending on the API.
The OS
wakes the app when the constraints are met to run the scheduled job
.
Yes! if the user choice to force stop the app, the OS
deletes all the scheduled job and the WorkManger
won't be able to reschedule them until you open the app.
Upvotes: 3