Skip to content

Migrate from JobScheduler to firebase-jobdispatcher

Compare
Choose a tag to compare
@vikeri vikeri released this 20 Aug 16:23
· 48 commits to master since this release

This update is a breaking change.

tl;dr:

  • Library is now compatible down to Android API +16, thanks @ToTeTo!
  • New flag exact makes the Job run at exact intervals (but consumes more battery).
  • Flag alwaysRunning and method getAll has been deprecated

The library is now based on firebase-jobdispatcher instead of the built in JobScheduler. This means the library will work with Android +16 instead of previous +21. This major effort was done by @ToTeTo. Thanks a lot!

Regrettably alwaysRunning has been removed. Personally I don't have time to add it again on top of @ToTeTo's changes since we are no longer using the feature at Pilloxa. But if someone wants to do this a PR is more than welcome. In theory one should only have to reimplement the Java and Javascript changes in this PR: https://github.com/vikeri/react-native-background-job/pull/20/files