• BlackBerry Dynamics
  • Runtime library for Android applications
  • 9.2.0.99
GDStateAction Interface Reference

Intent Filter key constants for authorization and update events. More...

Description

These constants can be used as Intent Filter keys to register receivers for BlackBerry Dynamics authorization and update events.

The BlackBerry Dynamics runtime dispatches authorization and update events by local broadcast to registered receivers. To register a receiver:

  • Instantiate a native BroadcastReceiver object.
  • Call the GDAndroid registerReceiver method.
  • Pass a reference to the object as the receiver parameter.
  • Pass an Intent Filter for one or more of these constants as the filter parameter.

See the individual descriptions for details of the types of event that are notified.

The constant names correspond to the callback names in the GDStateListener interface.

It is possible to utilize this mechanism to receive a GD_STATE_AUTHORIZED_ACTION event as notification of the first completion of authorization processing, i.e. instead of using a GDAppEventListener or a GDStateListener implementation. The receiver would have to be registered prior to activityInit or authorize being called. If the receiver was registered after, it would be possible for authorization processing to complete prior to the receiver being registered, and for the broadcast to be lost. In that case it is necessary to prepare the runtime, by calling applicationInit before registering the receiver. The order of calls would be as follows.

  1. GDAndroid.applicationInit, typically in the Application class implementation.
  2. GDAndroid.registerReceiver .
  3. GDAndroid.authorize or GDAndroid.activityInit.

If the application uses this mechanism to monitor authorization, and doesn't implement GDStateListener nor GDAppEventListener, then the BlackBerry Dynamics event receiver check must be switched off. Instructions for switching off are on the Build-Time Configuration page, under the Event Receiver Check heading.

See also
GDNetworkInfo for details of network connection status notification events, which are also sent by local broadcast.
Sample code in the com.good.automated_test_support.GDSDKStateReceiver class, in the BlackBerry Dynamics Automated Test Support Library for Android.

Static Public Attributes

static final String GD_STATE_AUTHORIZED_ACTION = "com.good.gd.AUTHORIZED"
 Intent Filter key for authorization granting or unlocking. More...
 
static final String GD_STATE_LOCKED_ACTION = "com.good.gd.LOCKED"
 Intent Filter key for user interface locking. More...
 
static final String GD_STATE_WIPED_ACTION = "com.good.gd.WIPED"
 Intent Filter key for permanent authorization withdrawal. More...
 
static final String GD_STATE_UPDATE_CONFIG_ACTION = "com.good.gd.UPDATE_CONFIG"
 Intent Filter key for changes to application configuration and other settings from the enterprise. More...
 
static final String GD_STATE_UPDATE_POLICY_ACTION = "com.good.gd.UPDATE_POLICY"
 Intent Filter key for changes to application-specific policy settings. More...
 
static final String GD_STATE_UPDATE_SERVICES_ACTION = "com.good.gd.UPDATE_SERVICES"
 Intent Filter key for changes to services-related configuration. More...
 
static final String GD_STATE_UPDATE_ENTITLEMENTS_ACTION = "com.good.gd.UPDATE_ENTITLEMENTS"
 Intent Filter key for changes to entitlements. More...
 
static final String GD_STATE_CONTAINER_MIGRATION_PENDING = "com.good.gd.CONTAINER_MIGRATION_PENDING"
 Intent Filter key for pending migration of the end user. More...
 
static final String GD_STATE_CONTAINER_MIGRATION_COMPLETED = "com.good.gd.CONTAINER_MIGRATION_COMPLETED"
 Intent Filter key for completion of end user migration. More...
 
static final String GD_STATE_ACTIVATION_ACTION = "com.good.gd.ACTIVATION"
 Intent Filter key for activation. More...
 

Member Data Documentation

◆ GD_STATE_AUTHORIZED_ACTION

final String GD_STATE_AUTHORIZED_ACTION = "com.good.gd.AUTHORIZED"
static

This type of broadcast event will be dispatched when:

  • The user has been authorized to access the application and its data, following authorization processing.
  • The user interface of the application was locked and has now been unlocked.

◆ GD_STATE_LOCKED_ACTION

final String GD_STATE_LOCKED_ACTION = "com.good.gd.LOCKED"
static

This type of broadcast event will be dispatched when the user interface of the application has been locked, for example:

  • When the application has been locked due to expiry of the idle time out.
  • When a remote lock command has been received from the enterprise management console.
  • When an enterprise policy violation has been detected and the enforcement action is to lock the application.

If the condition that caused locking is cleared, for example if the user stops being idle, then a GD_STATE_AUTHORIZED_ACTION broadcast event will be dispatched.

The Intent extras will include a GDAppResultCode object containing the precise result code value that would be sent using the GDAppEvent interface, as a Serializable extra under the key value GD_STATE_LOCKED_ACTION. The value of this GDAppResultCode object will be one of GDErrorRemoteLockout, GDErrorPasswordChangeRequired, GDErrorBlocked, GDErrorAppVersionNotEntitled, or GDErrorIdleLockout.

◆ GD_STATE_WIPED_ACTION

final String GD_STATE_WIPED_ACTION = "com.good.gd.WIPED"
static

This type of broadcast event will be dispatched when the authorization of the user has been permanently withdrawn, for example:

  • When the end user's entitlement to the application has been removed by the enterprise administrator.
  • When a remote wipe command has been received from the enterprise management console.
  • When an enterprise policy violation has been detected and the enforcement action is to wipe the application.

This broadcast event notifies the application that the container has been wiped of all application data and authentication credentials. Wiped data cannot be retrieved nor restored.

The application cannot be run after a device wipe, until the following steps have been taken.

  • Any policy violations have been cleared, if possible, or policy settings have been changed by the enterprise administrator.
  • The application is terminated on the device, by using the native task manager, and then restarted, or the device is power-cycled, or the application is re-installed.

The application will then open as if being started for the first time. The user will then have to complete BlackBerry Dynamics activation.

◆ GD_STATE_UPDATE_CONFIG_ACTION

final String GD_STATE_UPDATE_CONFIG_ACTION = "com.good.gd.UPDATE_CONFIG"
static

This broadcast event will be dispatched when an application configuration or other setting has been changed. This condition can be formally expressed as: when any value in the collection that would be returned by GDAndroid.getApplicationConfig is different.

The Intent extras will include a Map<String, Object> containing the collection that would be returned if GDAndroid.getApplicationConfig were called now. This constant is also used as the key for the collection within the extras bundle.

◆ GD_STATE_UPDATE_POLICY_ACTION

final String GD_STATE_UPDATE_POLICY_ACTION = "com.good.gd.UPDATE_POLICY"
static

This broadcast event will be dispatched when an application-specific policy setting has been changed. This condition can be formally expressed as: when any value in the collection that would be returned by GDAndroid.getApplicationPolicy is different.

The Intent extras will include a Map<String, Object> containing the collection that would be returned if GDAndroid.getApplicationPolicy were called now. This constant is also used as the key for the collection within the extras bundle.

◆ GD_STATE_UPDATE_SERVICES_ACTION

final String GD_STATE_UPDATE_SERVICES_ACTION = "com.good.gd.UPDATE_SERVICES"
static

This broadcast event will be dispatched when the BlackBerry Dynamics shared services configuration of one or more applications has changed. This condition can be formally expressed as: when the results of any possible GDAndroid.getServiceProvidersFor query has changed.

If the application has previously made a call to GDAndroid.getServiceProvidersFor and stored any part of the result, then that processing should be repeated when this event is dispatched.

◆ GD_STATE_UPDATE_ENTITLEMENTS_ACTION

final String GD_STATE_UPDATE_ENTITLEMENTS_ACTION = "com.good.gd.UPDATE_ENTITLEMENTS"
static

This broadcast event will be dispatched when the entitlements data of the end user has changed. If the entitlements of the end user had previously been checked, by calling the GDAndroid.getEntitlementVersions method, then the entitlements should be checked again now.

◆ GD_STATE_CONTAINER_MIGRATION_PENDING

final String GD_STATE_CONTAINER_MIGRATION_PENDING = "com.good.gd.CONTAINER_MIGRATION_PENDING"
static

This broadcast event will be dispatched when the end user has been selected for migration between management console instances.

Migration between management console instances could occur when end users are moved from a legacy Good Control server to an integrated BlackBerry Unified Endpoint Manager (UEM) server, for example.

Migration has two stages:

  1. The end user is selected, at which point migration is pending and this event is dispatched.
  2. Migration takes place, after which migration is complete and the GD_STATE_CONTAINER_MIGRATION_COMPLETED event is dispatched.

A pending migration will be finalized the next time the application starts, as part of BlackBerry Dynamics authorization processing. Migration finalization involves processing that is similar to initial activation. Finalization can't be processed when the application is authorized and running. Its connection to the BlackBerry Dynamics infrastructure would be disrupted, so migration waits for the next application start.

This event enables the application to warn the end user that they will be migrated the next time the application starts.

◆ GD_STATE_CONTAINER_MIGRATION_COMPLETED

final String GD_STATE_CONTAINER_MIGRATION_COMPLETED = "com.good.gd.CONTAINER_MIGRATION_COMPLETED"
static

This broadcast event will be dispatched when the end user has been migrated between management console instances, see GD_STATE_CONTAINER_MIGRATION_PENDING.

This event enables the application to clear any warnings it may have shown about pending migration.

◆ GD_STATE_ACTIVATION_ACTION

final String GD_STATE_ACTIVATION_ACTION = "com.good.gd.ACTIVATION"
static

This type of broadcast event will be dispatched when:

  • Activation is in progress
  • Activation completes successfully
  • Activation fails