Update BackgroundTask.tsx

This commit is contained in:
2021-04-02 14:47:43 +02:00
parent 9b5fd26245
commit f13fa65af5

View File

@@ -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);
}
}