Expo Location. killServiceOnDestroy option

Please provide the following:

  1. SDK Version: 45

  2. Platforms(Android/iOS/web/all): Android

  3. Add the appropriate “Tag” based on what Expo library you have a question on.

    await Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, {
    // For better logs, we set the accuracy to the most sensitive option
    accuracy: Location.Accuracy.Highest,
    timeInterval: 5000,
    // Make sure to enable this notification if you want to consistently track in the background
    showsBackgroundLocationIndicator: true,
    foregroundService: {
    notificationTitle: “Location”,
    notificationBody: “Location tracking in background”,
    notificationColor: “#fff”,
    killServiceOnDestroy: true

I tried this code without the option killServiceOnDestroy, and my app was saving locations after the app was killed. I then realized the existence of this option (there is no documentation at all), but doesn’t work, my app stills updating locations after the app is killed.

I’m a little confused because there is people complaining that location doesn’t works after app is killed. But this is what is supposed to do when an app is killed.

I can stop manually location services with a close button, but I think that most of the people swipes (kills) the app.
Any ideas, TIA

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.