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

Switch to WorkManager #3147

Closed
Tracked by #3145
tobiasKaminsky opened this issue Oct 15, 2018 · 3 comments
Closed
Tracked by #3145

Switch to WorkManager #3147

tobiasKaminsky opened this issue Oct 15, 2018 · 3 comments

Comments

@tobiasKaminsky
Copy link
Member

https://developer.android.com/topic/libraries/architecture/workmanager

The WorkManager API makes it easy to specify deferrable, asynchronous tasks and when they should run. These APIs let you create a task and hand it off to WorkManager to run immediately or at an appropriate time.

WorkManager chooses the appropriate way to run your task based on such factors as the device API level and the app state. If WorkManager executes one of your tasks while the app is running, WorkManager can run your task in a new thread in your app's process. If your app is not running, WorkManager chooses an appropriate way to schedule a background task…

Currently we use android-job from Evernote and they suggest to switch over.

@nextcloud-android-bot

This comment has been minimized.

@tobiasKaminsky
Copy link
Member Author

What to do

  • slowly switching from evernote to WorkManager
  • centralize all constrain checks with ConnectivtyService/DeviceModule (e.g. battery, wifi)
  • all Jobs need to handle start/stop/restart gracefully, we must make sure that jobs really end
  • write test cases

@ezaquarii
Copy link
Collaborator

@tobiasKaminsky @AlvaroBrey I think the migration has been completed some time ago. Shall we close it?

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

No branches or pull requests

4 participants