Location tracking in Flutter for Android and iOS devices

Hello Team,

Need help to figure out a possible solution for both iOS & Android. I'm building a Flutter app that is in constant communication with the backend Laravel application that manages the database.

Currently, when the app is active in the foreground, it fetches the location and does the API communication to store the location data.

But how to run this particular app in the background to track the location and communicate back to its Laravel backend application with an API in an interval of 15 seconds, even if the phone is idle / screen is off??



3 Replies

HK Hariharasudhan Kanagaraj Syncfusion Team August 29, 2023 01:36 PM UTC

Hi Priswin,


We have analyzed your query and we have shared the blog below regarding the live location tracking using the SfMaps for your reference.

https://www.syncfusion.com/blogs/post/how-to-add-location-tracking-to-your-app-using-syncfusion-flutter-maps.aspx.


Here, we have updated the marker by tracking the live location using SfMaps and you can refer this to track the live location according to your needs.


If the provided solution does not meet your actual requirements, we recommend that you share any recording or snapshot related to the mentioned requirement, along with a detailed explanation of your use case. With this additional information, it will be very helpful for us to provide the best possible solution.


Regards,

Hari Hara Sudhan. K.



PJ priswin jose September 1, 2023 06:03 AM UTC

Thanks, Hariharasudhan for your reply. But your solution doesn't help us to sort out the issue.

My app must run in the background to track the location and communicate back to its Laravel backend application with an API. No need to display the map inside the app.

Regards,
Priswin Jose



HK Hariharasudhan Kanagaraj Syncfusion Team September 4, 2023 12:13 PM UTC

Hi Priswin,


As the query mentioned is general, we suggest you contact the Flutter community through the below link.

Flutter Community - https://flutter.dev/community.


Regards,

Hari Hara Sudhan. K.


Loader.
Up arrow icon