stopMonitoringAllGeofences()

Stop monitoring all geofences.

Syntax 

1import { getGeofencingService } from 'lightning/mobileCapabilities';
2stopMonitoringAllGeofences(): Promise<void>;

Parameters 

None.

Returns 

A Promise object that resolves as void. If there’s an error, a rejected promise returns the error type of GeofenceServiceFailure.

Usage 

This function stops the monitoring of all geofences.

1myGeofenceService.stopMonitoringAllGeofences()
2    .then(() => {
3        const msg = `Successfully stopped monitoring all geofences.`;
4        console.log(msg);
5    })
6    .catch((error) => {
7        const msg = `Failed to stop monitoring:${JSON.stringify(error)}`;
8        console.log(msg);
9    });

Release Preview

This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.