How to stop the background Geolocation ?

Please provide the following:

  1. SDK Version: v34
  2. Platforms(Android/iOS/web/all): Android

Hi there, is there a way to stop background geolocation when he app is stopped on android ?

I would like to have it available only when the app is in foreground or background, but when the app is closed background geofencing continues.

Currently this the default in ios, but it is not in android.

We have defined the location this way :

await Location.startLocationUpdatesAsync(AppConstants.locationTask, {
		accuracy: Location.Accuracy.High,
		timeInterval: 10000,
		pausesUpdatesAutomatically: true,
		activityType: Location.ActivityType.AutomotiveNavigation,
		showsBackgroundLocationIndicator: true,
		foregroundService: {
			notificationTitle: 'Geolocation happenning',
			notificationBody: 'Geolocation',
			notificationColor: AppConstants.primaryColor,
		},
	})

Is there a way to tell geofencing to stop when app is killed ?
Or is there a way to get when the app is killed and stop the process from the app ?

Looking forward your answer,

have a nice day !

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