Open vladimir-vucetic opened 1 month ago
Only think that is wrong from what I can see in logs is when press schedule button I get this part of log:
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: {
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "taskId": "com.transistorsoft.customtask",
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "isFetchTask": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "minimumFetchInterval": 15,
**04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "stopOnTerminate": true,**
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "requiredNetworkType": 0,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "requiresBatteryNotLow": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "requiresCharging": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "requiresDeviceIdle": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "requiresStorageNotLow": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "startOnBoot": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "forceAlarmManager": true,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "periodic": false,
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: "delay": 5000
04-10 16:47:53.727 17642 17729 D TSBackgroundFetch: }
In order for stopOnTerminate: false
, you must necessarily also set enableHeadless: true
.
Add those options here
Ah I tried by adding only stopOnTerminate
it work now, thanks.
And property on schedule periodic what it actually do? I set it to true expecting that it will then run schedule every 5sec but it seems it's not that?
This issue is stale because it has been open for 30 days with no activity.
Your Environment
react-native -v
): 0.73.6Expected Behavior
From example app create schedule on android. Kill the app. Lock phone. Schedule execute at specified time.
Actual Behavior
Example project schedulle save logs while app is in foreground or background. But when app is killed n\no log is saved.
Steps to Reproduce
Context
Create schedule on android. Kill the app. Lock phone. Schedule execute at specified time.
Debug logs