Class GeotriggerNotificationInfo

  • Direct Known Subclasses:
    FenceGeotriggerNotificationInfo

    public class GeotriggerNotificationInfo
    extends Object
    A notification that a Geotrigger condition has been met.

    A GeotriggerNotificationInfo is sent by a GeotriggerMonitor whenever the condition described by its Geotrigger is met. The Geotrigger also defines how the GeotriggerNotificationInfo should be created. For example, it describes what message should be displayed to the user.

    Since:
    100.12.0
    • Method Detail

      • getGeotriggerMonitor

        public GeotriggerMonitor getGeotriggerMonitor()
        Gets the GeotriggerMonitor that sent this notification.

        The GeotriggerMonitor evaluates a specific Geotrigger condition that has been met by this GeotriggerNotificationInfo. A single Geotrigger condition can result in multiple, repeat notifications.

        This property can be used to interact directly with the GeotriggerMonitor. For example, if you no longer want to receive future notifications, you can call GeotriggerMonitor.stop().

        Returns:
        the GeotriggerMonitor that sent this notification
        Since:
        100.12.0
      • getMessage

        public String getMessage()
        Gets a message that describes the notification.

        The notification message is the result of evaluating the Geotrigger.getMessageExpression() for the specific objects that triggered this notification. The message could be a hard-coded string or use attributes from an area of interest that was entered to display a custom message.

        For example, with a FenceGeotrigger, setting the Geotrigger.getMessageExpression() property to:

        "You have entered " + $fencefeature.area_name

        would return the getMessage() "You have entered Area A", where "area_name" is an attribute field on the FenceGeotriggerNotificationInfo.getFenceGeoElement().

        You can use this message to alert the user of the notification or in other business logic in your app.

        Returns:
        a message that describes the notification
        Since:
        100.12.0
      • getMessageProperties

        public Map<String,​Object> getMessageProperties()
        Gets a dictionary of optional properties derived from the Geotrigger.getMessageExpression().

        Optionally, the ArcadeExpression can be evaluated to produce properties on top of the basic getMessage(). You can access this additional information via this dictionary.

        Returns:
        a dictionary of optional properties derived from the Geotrigger.getMessageExpression().
        Since:
        100.12.0