expo background fetch stopOnTerminate options not working

Platform = android
expo sdk = latest

I copied example code from expo backgroundFetch page(BackgroundFetch - Expo Documentation) and run on my android expo app
when I close my app it runs on background as logs appear on console but when I remove apps from recent tabs on my phone then logs will disappear so backgroundFetch not working when app terminates. Also when I set minimumInterval to 1 then app not runs in background after 1s. It runs after 1 minute.

I attached reisterBackgroundFetchAsync to see that I set stopOnTerminate to false but app is not logging anything on console after terminating.

async function registerBackgroundFetchAsync() {
return BackgroundFetch.registerTaskAsync(BACKGROUND_FETCH_TASK, {
minimumInterval: 5,
stopOnTerminate: false, // android only,
startOnBoot: true, // android only
});
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.