Closed albertstill closed 1 week ago
I've set up a schedule: ['1 00:00-23:59']
running in the iOS Simulator with Freeway Drive. I will see what happens at midnight tonight.
Ok, I reproduced this in the simulator by manually modifying my work-station's date/time (you terminate the iOS Simulator after doing so, for it to catch the updated time).
I found the problem and released a fix to v4.15.2
.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Your Environment
react-native -v
): 0.71.16// In root component's render method useEffect(() => { async function execute() { await BackgroundGeolocation.ready({ reset: false, }); }
execute(); }, []);
...
// in code that handles user setting a day based schedule
async function stopBGSchedule() { const state = await BackgroundGeolocation.stopSchedule(); if (state.enabled) { await BackgroundGeolocation.stop(); } }
// e.g
[ '1 00:01-23:59']
function setSchedule(scheduleArray) { await stopBGSchedule();await BackgroundGeolocation.setConfig({ distanceFilter: 25, stopOnTerminate: false, startOnBoot: true, foregroundService: true,
});
await BackgroundGeolocation.startSchedule(); }