Newer Version Available

This content describes an older version of this product. View Latest

Monitor Geofence Regions on a Mobile Device

A Lightning web component can use a mobile device’s location features to determine a user’s current location to the user’s proximity to areas that may be of interest, or to perform location-related tasks. The longitude, latitude, and radius define a geofence around the regions of interest.

Geofence location is determined locally on the mobile device, and doesn’t need a network connection. However, GeofencingService does require a GPS signal from the device. For Android devices, Google Location Accuracy must be enabled in the system settings. GeofencingService does require access to platform-specific APIs that are available only within compatible Salesforce mobile apps.

GeofencingService does not and cannot function when running in a web browser, whether on a desktop or mobile device.

Important