GeofencingService Data Types
GeofencingService defines and uses several data types.
An object representing the coordinates and radius of the geofence region.
Property Name | Type | Description | Example |
---|---|---|---|
latitude | Number | The latitude, in degrees. Ranges from -90 to 90. | 37.785834 |
longitude | Number | The longitude, in degrees. Ranges from -180 to 180. | -122.406417 |
radius | Number | The radius of the geofence in meters. | 5 |
notifyOnEntry | Boolean | Monitors the entry into the geofence radius. Defaults to true . | false |
notifyOnExit | Boolean | Monitors the exit out of the geofence radius. Defaults to true . | false |
message | String | Notification triggered by a geofence event. | “Geofence region entered” |
triggerOnce | Boolean | Removes geofence after it’s triggered. Defaults to true . | false |
An object representing an error that occurred when accessing GeofencingService features.
Property Name | Type | Description |
---|---|---|
code | GeofencingServiceFailureCode | A value representing the reason for a location error. Possible failure codes include:
|
message | String | A 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.