GeofencingService Data Types

GeofencingService defines and uses several data types.

Geofence 

An object representing the coordinates and radius of the geofence region.

Property NameTypeDescriptionExample
latitudeNumberThe latitude, in degrees. Ranges from -90 to 90.37.785834
longitudeNumberThe longitude, in degrees. Ranges from -180 to 180. -122.406417
radiusNumberThe radius of the geofence in meters.5
notifyOnEntryBooleanMonitors the entry into the geofence radius. Defaults to true.false
notifyOnExitBooleanMonitors the exit out of the geofence radius. Defaults to true.false
messageStringNotification triggered by a geofence event.“Geofence region entered”
triggerOnceBooleanRemoves geofence after it’s triggered. Defaults to true.false

GeofencingServiceFailure 

An object representing an error that occurred when accessing GeofencingService features.

Property NameTypeDescription
codeGeofencingServiceFailureCode A value representing the reason for a location error. Possible failure codes include:
  • locationServiceDisabled
  • userDeniedPermission
  • userDisabledPermission
  • unavailableOnHardware
  • maxGeofenceMonitoredReached
  • invalidLatitude
  • invalidLongitude
  • serviceNotEnabled
  • nativeError
messageStringA string value explaining the reason for the failure. This value is suitable for use in user interface messages. The message is provided in English and isn’t localized.

nativeError is a special case because it represents an error that’s specific to the underlying platform (Android or iOS). If you receive this failure, check the message value for details.

Note

 

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.