Closed Mohamed50 closed 1 month ago
Still waiting for help here
This library doesn't seem to implement BGProcessingTaskRequest
.
But even if you did, it's not possible to send the current location information to the API every 5 minutes
This is a limitation of ios
You can refer to https://pub.dev/packages/workmanager
i'm trying to send me current location to API every 5 minutes while the app is in background. i was able to achieve this by creating a Timer.periodic and call the callback every 5 minutes. everything work fine when i run the app from my Mac into my Iphone. But when i push the app to testFlight and download it from there the timer doesn't work. when you reopen the app again the Timer callback get called immediately.
here is my code where i initialize the service.
here is the onStart method where i set the timer
here is me callback where i do the api call
here is a link to the full project repo: https://github.com/Mohamed50/auto_login
Please let me know if i'm doing something wrong i have been stuck with this for a week now. Appreciate any help or suggestion to achieve this and thanks for the great work.