geomonitor_region_set_notification_invoke_target()

Set a notification invoke target for the region.

Synopsis:

#include <geomonitor.h>
 
geomonitor_error_t geomonitor_region_set_notification_invoke_target(geomonitor_region_t region, const char *invocation_target, geomonitor_notification_type_t notification_type)

Since:

BlackBerry 10.2.0

Arguments:

region

A handle to the geomonitor region.

invocation_target

The application invocation target key. This is set in the application's BAR manifest file and is used by the Invocation Framework to launch an app. The length of the key cannot exceed 50 characters. Ownership of this parameter is not transferred.

notification_type

The method used to send the event to the application; either directly or via the Hub.

Library:

libgeomonitor (For the qcc command, use the -l geomonitor option to link against this library)

Description:

An application can set an notification invoke target to receive geomonitor events even when the application is not running.

When a geomonitor event occurs, the geomonitor event type and monitored region name are sent to the application via the Invocation Framework. However, an application must have a valid invoke target-key to handle invocation framework events.

The application is launched if it is not running, and the event type and region name are passed to it.

Events can be sent to the application directly (only if the application provides an invoke key for launching its headless version) or they can be pushed to the BlackBerry Hub as notifications with actionable items.

By default these parameters are set to NULL and to GEOMONITOR_NOTIFICATION_NONE. Both parameters must either be set to valid values or to the default values. Setting only one parameter to a valid value will result in an error.

Returns:

GEOMONITOR_OK if successful, an error from geomonitor_error_t otherwise.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus