INNER CODE UNIT · JavaScript
fn
jamesisaac/react-native-background-task · js/index.android.js:14
const fn = async () => {
task()
}
AppRegistry.registerHeadlessTask('BackgroundTask', () => fn)
},
schedule: function(
{
period = 900, // 15 minutes
timeout = 30,
flex,
} = {}
) {
// Default flex to within 50% of the period
if (!flex) {
flex = Math.floor(period / 2)
}