GeotriggerMonitor class final
A GeotriggerMonitor monitors a Geotrigger condition and, when it is met, results in a GeotriggerNotificationInfo.
A Geotrigger defines a query that is evaluated against GIS data as it changes in real time. For example, "Notify me when my device location enters one of my target areas" or "Notify me when my device location is within 50 m of my destination".
A GeotriggerMonitor is created with a Geotrigger that it continually checks to determine whether the condition has been met.
Once a GeotriggerMonitor is created, you begin checking the condition by calling GeotriggerMonitor.start. Once you are finished, call GeotriggerMonitor.stop. When a Geotrigger evaluates to true, a GeotriggerMonitor.onGeotriggerNotificationEvent is sent. You can subscribe to the notification info to receive details of where the Geotrigger was activated and the condition that was met.
A GeotriggerMonitor can continue monitoring its Geotrigger condition when a mobile application is in the background. To enable this in an iOS or Android application, the following is recommended:
- Use a LocationGeotriggerFeed with a LocationDataSource based on the GPS of the device.
- Add manifest entries and request user permissions to allow background location updates.
The GeotriggerMonitor uses processing time provided by device location updates to monitor the active geotrigger. For backgrounded applications, the timing of location updates (and therefore the timing of geotrigger notifications) is determined by the operating system. If a FenceGeotrigger uses FeatureFenceParameters that reference a ServiceFeatureTable, and the table is associated with a FeatureLayer that has a non-zero FeatureLayer.refreshInterval, the geotrigger monitor requests fence updates from the server on that interval even when the application is in the background.
- Implemented types
Constructors
- GeotriggerMonitor(Geotrigger geotrigger)
-
Constructs a GeotriggerMonitor with a Geotrigger condition.
factory
Properties
- geotrigger → Geotrigger
-
The Geotrigger that will be monitored.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onGeotriggerNotificationEvent
→ Stream<
GeotriggerNotificationInfo> -
Indicates that the GeotriggerMonitor condition has been meet.
no setter
-
onStatusChanged
→ Stream<
GeotriggerMonitorStatus> -
Indicates that the GeotriggerMonitor.status property has changed.
no setter
-
onWarningChanged
→ Stream<
ArcGISException?> -
Indicates that the GeotriggerMonitor.warning property has changed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → GeotriggerMonitorStatus
-
The current monitoring status of the GeotriggerMonitor.
no setter
- warning → ArcGISException?
-
An error that describes a problem encountered while starting or monitoring
the Geotrigger.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → Future< void> - Starts evaluating the GeotriggerMonitor.
-
stop(
) → void - Stops evaluating the GeotriggerMonitor.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited