Update BackgroundTask.tsx
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user