Friday, July 26, 2024
HomeiOS Developmentandroid - Operating a background activity each 10 minutes to replace server...

android – Operating a background activity each 10 minutes to replace server with gadget location


I’m writing a flutter app (Android & IOS) which requires sending the gadget location as soon as each ~10 minutes.
This activity is required to proceed operating within the background even when the app is within the again or terminated.
The server makes use of the placement to ship a background notification to the app when the person is in proximity of one other person of the app.
I do know there are various limitations set by the OS on background duties, and there’s the influence of frequent location updates on battery life.

What’s the finest technique of implementing such a requirement?

I’ve seen packages like workmanager & flutter_background_service – but it surely seems from their paperwork that the minimal interval is quarter-hour, and it isn’t assured.
There are additionally packages for getting background location (comparable to background_location, or background-location-tracker). These are triggered by location adjustments and never by time interval and I’m involved they are often extra battery draining if run over many hours a day.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments