Releases: vikeri/react-native-background-job
Expose result of scheduling as Promise
Support Android SDK 56 and RN 0.56
This update brings support to targetSDK 26. In order for that to work your background job will have to show a notification while it's executing. Specify the notificationText
and notificationTitle
when you schedule the job. See more here: https://github.com/vikeri/react-native-background-job#schedule
Fix ANR issues for Oreo
Fixes: #71
Included function for checking if the app is ignoring battery optimizations
Fix foreground jobs not firing
Thanks alexey-kuznetsov for fixing an issue where foreground jobs were not firing
- Fixed #54
Migrate from JobScheduler to firebase-jobdispatcher
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 methodgetAll
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
Fix crash on open and now works with >RN 44.3
Persistent always on background jobs
A new parameter, alwaysRunning is added to the schedule function and this will allow the app to run forever and prevent the system from killing it. To allow this, Android requires the app to show a notification.
Note: This will not work or at least act unexpectedly with multiple background jobs, currently only one job is supported. PR's fixing this are welcome but for our company's use-case it is not a priority.
Bug fixes
Fixed icon issue and edge case when service is started with a null intent.
Other than that, see: https://github.com/vikeri/react-native-background-job/releases/tag/v1.1.3-0
Experimental support for ongoing background jobs
A new parameter, alwaysRunning
is added to the schedule
function and this will allow the app to run forever and prevent the system from killing it. To allow this, Android requires the app to show a notification.
Note: This will not work or at least act unexpectedly with multiple background jobs, currently only one job is supported. PR's fixing this are welcome but for our company's use-case it is not a priority.
This is not on master yet since it is very experimental, see the README.md on the feature branch.
Install with
yarn add react-native-background-job@beta