• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.0.1.79
GDServiceHelper Class Reference

AppKinetics send Intent helper. More...

Description

This class provides a helper programming interface that sends an Android Intent as an AppKinetics service request. This is an optional part of the service consumer side of AppKinetics.

An Intent can be sent by this helper if the following conditions are both met.

  • The Intent represents an action for which there is a corresponding BlackBerry Dynamics Application-Based Service.
  • A BlackBerry Dynamics application that is a registered provider of the service is available on the device.

If either of these conditions isn't met then it won't be possible to send the Intent as an AppKinetics service request.

Usage

The typical sequence of programming interfaces used is as follows.

  1. Create a native Intent object and set the ACTION.View, Scheme, and other attributes as usual.
  2. Call GDServiceHelper.getInstance to access the helper interface.
  3. Pass the Intent to canGDConsume to check whether it can be sent by AppKinetics.
  4. If it can, pass it to GDConsume and finish.
  5. If it can't, check the enterprise data leakage prevention (DLP) policy settings, using the GDAndroid.getApplicationConfig method.
  6. If policies allow it, send the Intent using the native Android interface.
  7. If policies don't allow it, the Intent mustn't be sent natively and the action cannot proceed.
See also
icc package reference for an overall description of AppKinetics, and how to send service requests directly, without using an Intent.

Public Member Functions

boolean canGDConsume (final Intent intent)
 Check whether an Intent can be sent as a service request. More...
 
boolean GDConsume (final Intent intent) throws GDServiceException
 Send an Intent as a service request. More...
 

Static Public Member Functions

static GDServiceHelper getInstance ()
 Get a reference to the interface object. More...
 

Member Function Documentation

◆ canGDConsume()

boolean canGDConsume ( final Intent  intent)

Call this method to check whether an Intent can be sent as an AppKinetics service request. Conditions for this check are in the class description, above.

Parameters
intentIntent to be checked.
Returns
true if the Intent can be sent as a service request.
false otherwise.

◆ GDConsume()

boolean GDConsume ( final Intent  intent) throws GDServiceException

Call this method to send an Intent as an AppKinetics service request. Only call this method if the canGDConsume method returned true for the Intent.

Parameters
intentIntent to be sent.
Returns
true if the Intent will be sent as a service request.
false if the Intent can't be sent as a service request and the application must take some other action.
Exceptions
GDServiceException

◆ getInstance()

static GDServiceHelper getInstance ( )
static

This method returns a reference to the AppKinetics send Intent helper interface object.

The AppKinetics send Intent helper is a "singleton class".

Returns
Reference that can be used to call, for example, canGDConsume.