Update BackgroundTask.tsx
This commit is contained in:
parent
9b5fd26245
commit
f13fa65af5
1 changed files with 4 additions and 2 deletions
|
|
@ -45,9 +45,9 @@ export class BackgroundTask extends Component<BackgroundTaskProps<CustomStyle>>
|
|||
}
|
||||
|
||||
// Initialize BackgroundFetch only once when component mounts.
|
||||
await BackgroundFetch.configure(
|
||||
let status = await BackgroundFetch.configure(
|
||||
{
|
||||
minimumFetchInterval: 30, //Minimum interval time for schedule. Can be (much) longer.
|
||||
minimumFetchInterval: 15, //Minimum interval time for schedule. Can be (much) longer.
|
||||
enableHeadless: true, //HeadlessJS mode for Android only
|
||||
startOnBoot: true, //Start when device starts, Android only
|
||||
stopOnTerminate: false //Stop task when app is killed, Android only
|
||||
|
|
@ -55,6 +55,8 @@ export class BackgroundTask extends Component<BackgroundTaskProps<CustomStyle>>
|
|||
onEvent,
|
||||
onTimeout,
|
||||
)
|
||||
|
||||
console.log('[BackgroundFetch] configure status: ', status);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue