ios - background location getting and sending periodically, silent push (Flutter)

1,318

For getting location updates when the app is active, in background or killed

I have used this package (background_locator) and it works as expected, you could also specify your own intervals as to when you want to receive the location updates (in your case 15 minutes)

You can check the example folder and documentation on the usage of the package

background_locator

Share:
1,318
Yar
Author by

Yar

Updated on January 03, 2023

Comments

  • Yar
    Yar over 1 year

    The goal is to get iPhone location and send it to the server periodically (like every 15 minutes, the interval is a parameter), when the app is on the screen, or in background. The server expects the phone location at given intervals even if the location did not change. We are using Flutter. The app is for iOS and Android. We have tried some libraries like background_fetch, but they seem not to guarantee the exact intervals. We are experimenting with silent push notifications but they do not work always, especially when the app is in background. Can anyone point me to the right direction please?

    • Yar
      Yar about 2 years
      We are using firebase_messaging. The problem is that after some time FirebaseMessaging.onBackgroundMessage is not called.
  • Yar
    Yar about 2 years
    Thanks. We have tried it already. Seems like for Android you can set time interval, but for iOS distance filter only. Is that correct? I need time interval for both systems.
  • Yar
    Yar about 2 years
    I marked this answer, because background_locator was the most important part of our solutions. We have added backgroundFetch and silent Push notifications all together.