Intent Manager

Note: To display only the features present on a particular device, select one or more filters from the SmartDocs bar below.

StageNow - 4.3

Overview

The Intent CSP allows an application to communicate with other applications using Android Intents, which provide a facility for performing late runtime binding between applications. This general-purpose mechanism includes a rich set of methods in the Android Intent Class to customize the Intent to meet the requirements of the application to which it is being sent. The most common use of Intents is to launch application Activities.

Highly complex Intents can be created using Java code, but it would be impractical for the Intent to attempt to describe every possible Intent. Instead, the most common use cases (of launching application Activities) are supported along with a modest capability to attach data items to cover other common use cases.

In Android, an Intent is an abstract description of an operation to be performed. Intents must be created and sent using one of the following APIs:

  • StartActivity launches an Activity within an application. This is usually used to perform a particular function of the user interface, such as selecting a contact name, and in such cases could return a result (the contact).
  • BroadcastIntent notifies one or more listener applications about the occurrence of some event, such as an external power supply being connected.
  • StartService starts a Service, which can continue to run in the background even after the component that started it is destroyed.

An Intent can be defined as a data structure that specifies an operation to be performed, and the data required to perform that operation. An Intent may consist of an action to enter the operation to be performed, data to be operated upon, and extra data items of various types to qualify the operation to be performed. Intents are defined by indicating how the Intent should be sent, entering an Android action name, URI and MIME type of the primary data, and by attaching extra data items.

Note: The Intent feature is not designed to create and send highly complex Intents, especially those that require numerous extra data items or those with complex data types. If complex Intents are required, Zebra recommends creating and packaging them as a Java app, and launching that application using a simpler Intent.

Intent Types

Explicit Intents

An Explicit Intent is directed to a specific application. It requests that application--and only that application--to perform the requested operation. An Explicit Intent can be sent using any of the available methods, but most commonly use the startActivity or startService methods to direct it to an Activity or Service within a specific application.

If an Intent specifies a Package Name and Class Name, it is considered an Explicit Intent because it will be sent only to the specific application identified by the Package Name and Class Name. An Explicit Intent will fail if an application with the specified Package Name and Class Name is not installed. An Explicit Intent can, but is not required to, enter additional information to tell the receiving application how to perform the requested operation.

Implicit Intents

An Implicit Intent is a generic request to perform an operation that does not enter which application or applications should perform that operation. An Implicit Intent may be sent using any of the available methods, but is most commonly sent using broadcastIntent to request an unspecified number of registered receivers to perform an operation.

If an Intent does not enter a Package Name and Class Name, it is considered an Implicit Intent because it does not enter a specific application to which it will be sent. An Implicit Intent may fail if there are no suitable registered receiver(s). An Implicit Intent must enter at least some information to tell the receiving application(s) about the operation to perform and how to perform it.

**Important: Implicit Intents will no longer be supported by the Intent CSP beginning with Andriod 7.0 Nougat. Use explicit Intents only on devices running Android N and higher.

Main Functionality

  • Select how the Intent will be sent:
    • StartActivity
    • BroadcastIntent
    • StartService
  • Enroll a Device Owner
  • Enter the Android Action name of the operation to be performed
  • Enter the URI and MIME Type of the primary data
  • Attach up to five (5) extra data items of the following data types:
    • Standard Integer
    • Character
    • Character Sequence
    • Floating Point
    • Long Integer
    • Boolean
    • Short
    • Double Precision Floating Point
    • String
    • Single Byte Integer
  • Set Intent to listen and launch on a key-press
  • Identify a key to launch an Intent

Action

Used to enter the Action to be invoked in other application(s) by the Intent.

Shown if: The Mode is "Immediate"

Parm Name: Action

Option Name Description Note Requires
1 StartActivity Sends an Intent using startActivity to invoke an Activity within an application.

MX: 4.1+

Android API: 1+

2 StartService Sends an Intent using startService to initiate operation of a background Service within an application.

MX: 4.1+

Android API: 1+

3 Broadcast Sends an Intent using 'broadcastIntent' to invoke registered broadcast receivers (listeners) within one or more applications.

MX: 4.1+

Android API: 1+

4 EnrollDeviceOwner Sends an Intent to enroll the Device Owner (specified using Package and Class parameters) for provisioning and device management. Useful for bypassing the Android Setup Wizard and GMS welcome screens; also works with non-GMS devices.

MX: 6.5+

Android API: 24+

Action Name

Used to enter the name of the action to be performed by the receiver(s) of the Intent. Whenever possible, the specified Action Name should be chosen from among those known to be supported by the intended receiver(s). While many Android action names are predefined, new action names can be added, making the set of possible action names effectively unlimited. Any given receiver might honor only a small subset of action names.

Note: Since the set of possible Action Names is extensible, the Intent does not put specific restrictions on the Action Names that can be specified. However, Android rejects an Intent for which there is no suitable receiver. In addition, certain receivers might require permissions to be held by an application before sending Intents with certain Action Names. If an attempt is made to send an Intent that is rejected by the Android system or by a specific receiver, an error will be returned in the Result XML.

Parm value input rules:

  • String from 1 - 255 characters

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner"

Parm Name: ActionName

Requires:

  • MX: 4.1+
  • Android API: 1+

Type

Used to enter the Package Type of the application to which the Intent will be sent. Entering this parameter classifies the Intent as Explicit, and will result in a failure if no application with the specified Package Type is installed.

Parm value input rules:

  • String from 0 - 255 characters containing the Package Type of the target app

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner"

Parm Name: Type

Requires:

  • MX: 4.1+
  • Android API: 1+

Category

Used to enter the Android Category of the application to which the Intent will be sent. A Category and Action Name combine to form a "channel" to which an app can listen for intents that use the same combination. This has the effect of filtering out the "chatter" of other intents using different value pairs. An app's intent Category is defined in its AndroidManifest.xml file.

Parm value input rules:

  • String containing the Category of the target app

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner"

Parm Name: Category

Requires:

  • MX: 8.0+
  • Android API: 23+

Class

Used to enter a Class Name within the app identified by the specified Package Name, to which the intent will be sent. Entering this parm classifies it as Explicit, and will result in a failure if no such Class exists within the specified app. The Package Name and Class Name parms should always be used together to enter a class within an app.

Parm value input rules:

  • String from 1–255 characters containing the Class Name of the target app

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner"

Parm Name: Type

Requires:

  • MX: 4.1+
  • Android API: 1+

Mode

Used to control whether the Intent is sent immediately upon execution of a profile, delayed until an assigned key is pressed, or canceled.

Parm Name: Mode

Option Name Description Note Requires
1 Immediate Sends the Intent immediately upon execution of the Profile in which it is contained.

MX: 10.2+

2 Schedule Delays sending of the intent until an assigned key is pressed.

MX: 10.2+

3 Cancel Cancels the intent and stops watching for the assigned key-press.

MX: 10.2+

Alert Button Action

Used to enter the Action to be invoked by the Intent when an Alert Button is pressed.

Parm Name: Action3

Option Name Description Note Requires
1 StartActivity Sends an Intent using startActivity to invoke an Activity within an application.

MX: 10.2+

2 StartService Sends an Intent using startService to initiate operation of a background Service within an application.

MX: 10.2+

3 Broadcast Sends an Intent using 'broadcastIntent' to invoke registered broadcast receivers (listeners) within one or more applications.

MX: 10.2+

Key Identifier

Used to identify the Key for which an Override-Key Mapping will be added or modified. To add or modify an Override Mapping for a Key, enter the Option (Key Identifier) listed in the table below that matches the friendly Name and Description of the Key to be mapped.

Not all devices have Keys for every Key Identifier in the table. Attempts to add an Override Mapping for a Key that is not present on a device will produce an error in the Result XML. For a list of supported Keys on a specific device, query the KeyMappingMgr for Key Identifiers or refer to the device documentation. For known deviations from these standards, see the Standards and Deviations section of the KeyMapping Manager Overview.

Shown if: The Mode is "Schedule"

Parm Name: KeyIdentifier

Option Name Description Note Requires
0-9 Number Keys Enter a number to select the corresponding numerical key. For example, enter the number "2" to select the "2" key.

MX: 10.2+

A-Z Alpha Keys Enter a letter of the alphabet to select the corresponding key. For example, enter the letter "A" to select the "A" key.

MX: 10.2+

DOT Period The period or "dot" key

MX: 10.2+

COMMA Comma The comma key

MX: 10.2+

STAR Star The "Star" key (this is not the "asterisk" key)

MX: 10.2+

POUND Pound The Pound ("#") or number-sign key

MX: 10.2+

F1-F12 Function Keys Use "F" plus the number of the desired function key. For example, enter "F10" to select the "F10" key.

MX: 10.2+

ENTER Enter The "Enter" key on the device (might be different than the "Return" key)

MX: 10.2+

UP Up The Up-arrow key

MX: 10.2+

DOWN Down The Down-arrow key

MX: 10.2+

LEFT Left The Left-arrow key

MX: 10.2+

RIGHT Right The Right-arrow key

MX: 10.2+

ESC Escape The Escape or "ESC" key

MX: 10.2+

BACKSPACE Backspace The Backspace or "BKSP" key

MX: 10.2+

SPACE Space The Space key or spacebar

MX: 10.2+

RETURN Return The "Return" key (might be different than the "Enter" key)

MX: 10.2+

CLR Clear The "Clear" key

MX: 10.2+

FIELD_EXIT Field Exit The "Field Exit" key

MX: 10.2+

ALT Alt The "Alt" modifier/meta key

MX: 10.2+

CTRL Control The Control or "CTRL" modifier/meta key

MX: 10.2+

SHIFT Shift The "SHIFT" modifier/meta key

MX: 10.2+

BLUE Blue The key that is colored completely blue (sometimes known as the "Function" key)

MX: 10.2+

ORANGE Orange The key that is colored completely orange (sometimes known as the "Alpha" key)

MX: 10.2+

DIAMOND Diamond The key marked with a "diamond" symbol

MX: 10.2+

GREEN Green Dot The key with a green dot on it

MX: 10.2+

RED Red Dot The key with a red dot on it

MX: 10.2+

VOLUMEUP Volume Up The key that increases the audio volume on the device

MX: 10.2+

VOLUMEDOWN Volume Down The key that decreases the audio volume on the device

MX: 10.2+

SCAN Scan The key or button that invokes the device scanner

MX: 10.2+

GRIP_TRIGGER Grip Trigger Usually the upper-most button on the hand grip

MX: 10.2+

GRIP_TRIGGER_2 Grip Trigger 2 The lower button on the hand grip when two grip buttons are present on the device

MX: 10.2+

LEFT_TRIGGER_1 Button L1 Usually the upper-most button on the left side of the device

MX: 10.2+

LEFT_TRIGGER_2 Button L2 The lower button on the left side of the device when two buttons are present on the left side

MX: 10.2+

RIGHT_TRIGGER_1 Button R1 Usually the upper-most button on the right side of the device

MX: 10.2+

RIGHT_TRIGGER_2 Button R2 The lower button on the right side of the device when two buttons are present on the right side

MX: 10.2+

LEFT_TRIGGER Left Trigger The button on the left side of a Zebra MC33 device (if so equipped)

MX: 10.2+

RIGHT_TRIGGER Right Trigger The button on the right side of a Zebra MC33 device (if so equipped)

MX: 10.2+

CENTER_TRIGGER Center Trigger The button at the top of the keypad on a Zebra MC33 device (if so equipped)

MX: 10.2+

GUN_TRIGGER Gun Trigger The button on the front of the handle of a Zebra MC33 device (if so equipped)

MX: 10.2+

HEADSET_HOOK Headset Button The button that picks up/hangs up the headset

MX: 10.2+

BACK Back The "BACK" key, button or capacitive button on the device

MX: 10.2+

HOME Home The "HOME" key, button or capacitive button on the device

MX: 10.2+

MENU Menu The "MENU" key, button or capacitive button on the device

MX: 10.2+

RECENT Recent The "Recent Apps" key, button or capacitive button on the device

MX: 10.2+

SEARCH Search The "Search" key, button or capacitive button on the device

MX: 10.2+

KEYLIGHT Keyboard Backlight The keyboard backlight key or button on the device

MX: 10.2+

LAMP Display Backlight The display-screen backlight key or button on the device

MX: 10.2+

POWER Power The "Power" (on/off) key or button on the device

MX: 10.2+

P1 P1 Button The button marked "P1"

MX: 10.2+

P2 P2 Button The button marked "P2"

MX: 10.2+

P3 P3 Button The button marked "P3"

MX: 10.2+

P4 P4 Button The button marked "P4"

MX: 10.2+

P5 P5 Button The button marked "P5"

MX: 10.2+

P6 P6 Button The button marked "P6"

MX: 10.2+

REAR_BUTTON Rear Button The button on the rear of the device

MX: 10.2+

LEFT_EXTERNAL_TRIGGER Left External Trigger The trigger button on the left side of an external triggering device

MX: 10.2+

RIGHT_EXTERNAL_TRIGGER Right External Trigger The trigger button on the right side of an external triggering device

MX: 10.2+

NAV_PAD Touch NAV_PAD The touch-sensitive navigation pad on a device

MX: 10.2+

M1 Macro 1 The Zebra VC80x M1 key

MX: 10.2+

M2 Macro 2 The Zebra VC80x M2 key

MX: 10.2+

M3 Macro 3 The Zebra VC80x M3 key

MX: 10.2+

M4 Macro 4 The Zebra VC80x M4 key

MX: 10.2+

M5 Macro 5 The Zebra VC80x M5 key

MX: 10.2+

M6 Macro 6 The Zebra VC80x M6 key

MX: 10.2+

BRIGHTNESSUP Brightness Up Key on the Zebra VC80x that increases screen brightness

MX: 10.2+

BRIGHTNESSDOWN Brightness Down Key on the Zebra VC80x that reduces screen brightness

MX: 10.2+

KEYLIGHTUP Keyboard Backlight Brightness Up The key that increases keyboard backlight brightness

MX: 10.2+

KEYLIGHTDOWN Keyboard Backlight Brightness Down The key that reduces keyboard backlight brightness

MX: 10.2+

Keep Device Awake (checkbox)

Used to control whether the device is permitted to enter suspend mode, which reduces power consumption and preserves battery life. Keeping device awake can help prevent missed notifications and/or key-presses.

Shown if: The Mode is "Schedule"

Parm Name: KeepDeviceAwake

Option Name Description Note Requires
0 (unchecked) Allows device to enter suspend mode.

MX: 10.2+

1 (checked) Prevents device from entering suspend mode.

MX: 10.2+

Package

Used to enter the Package Name of the application to which the intent will be sent. Entering this parm classifies the intent as Explicit, and will result in a failure if no app with the specified Package Name is installed. The Package Name and Class Name parms should always be used together to enter a class within an app.

Parm value input rules:

  • String from 1–255 characters containing the Package Name of the target app

Shown if: The Mode is NOT "Cancel"

Parm Name: Type

Requires:

  • MX: 4.1+
  • Android API: 1+

URI

Used to enter a Uniform Resource Identifier (URI) to identify the primary data for the Intent. A URI parm is not required unless there is some primary data to be processed by the operation requested by the Intent, typically a resource on a remote server. In most cases, a MIME Type also should be specified to define the type of the data referenced by the URI.

Parm value input rules:

  • String from 0 - 255 characters containing a URI

Shown if: The Mode is NOT "Cancel" and the Action is "StartActivity" or "StartService"

Parm Name: Uri

Requires:

  • MX: 4.1+
  • Android API: 1+

File

Used to enter a path and file name that identifies the primary data for the Intent. A File parm is not required unless there is some primary data to be processed by the operation requested by the Intent. In some cases, a MIME Type also should be specified to define the type of the data in the file.

Parm value input rules:

  • String from 1 - 255 characters containing a path and file name

Shown if: The Mode is NOT "Cancel" and the Action is "StartActivity" or "StartService"

Parm Name: File

Requires:

  • MX: 4.1+
  • Android API: 1+

JSON Data Selector

Used to enter how JSON data is provided if a JSON file or string is used to configure Device Owner (DO) enrollment.

Shown if: The Mode is NOT "Cancel" and Action is "Enroll Device Owner"

Parm Name: DOJsonData

Option Name Description Note Requires
1 Do Nothing This value (or the absence of this parm from the XML) causes no change; any previously selected setting is retained.

OSX: 6.5+

MX: 8.3+

Android API: 23+

2 Json File Specifies that a JSON file is used for JSON-based Device Owner configuration.

OSX: 6.5+

MX: 8.3+

Android API: 23+

3 Json String Specifies that a string is used for JSON-based Device Owner configuration.

OSX: 6.5+

MX: 8.3+

Android API: 23+

Device Owner JSON File

Used to enter the JSON file necessary to configure Device Owner (DO) enrollment.

Parm value input rules:

  • String of at least one character containing the name of the JSON file
  • File must reside on the device

Shown if: The Mode is NOT "Cancel" and Action is "Enroll Device Owner" and DO JsonData is "JsonFile"

Parm Name: DOJsonFileData

Requires:

  • OSX: 6.5+
  • MX: 8.0+
  • Android API: 23+

Device Owner JSON String

Used to enter JSON data as a string necessary to configure Device Owner enrollment.

Parm value input rules:

  • String from 1–500 characters

Shown if: The Mode is NOT "Cancel" and Action is "Enroll Device Owner" and DO JsonData is "JsonString"

Parm Name: DOJsonStringData

Requires:

  • OSX: 6.5+
  • MX: 8.3+
  • Android API: 23+

Extra Type

Used to enter the data type of data to be attached to an Intent as an Extra Data Item. Intents allow as many as five extra data items to be attached and sent using the set prompts, parameter names and data types documented below. Enter multiple Extra Types as ExtraType, Extra1Type, Extra2Type, Extra3Type and Extra4Type.

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner" and the Extra Type is NOT "none"

Parm Name: ExtraType

Option Name Description Note Requires
none None This value (or the absence of this parm from the XML) will cause no change to the corresponding extra data item to be attached to the Intent; any previously selected setting will be retained.

MX: 4.1+

Android API: 1+

int Standard Integer Causes the corresponding extra data item to be attached to the Intent with a data type of Standard Integer. The value provided must therefore be a string representing a valid standard integer value between -2^31 and 2^31 -1.

MX: 4.1+

Android API: 1+

char Character Causes the corresponding extra data item to be attached to the Intent with a data type of character. The value provided must therefore be a string containing a single character.

MX: 4.1+

Android API: 1+

charsequence Character Sequence Causes the corresponding extra data item to be attached to the Intent with a data type of Character Sequence. The value provided must therefore be a string containing a sequence of characters. This data type is can be used to supply values comparable to the String data type and should be used if the receiver explicitly requires a Character Sequence instead of a String.

MX: 4.1+

Android API: 1+

float Floating Point Causes the corresponding extra data item to be attached to the Intent with a data type of Single Precision Floating Point. The value provided must therefore be a string representing a valid single-precision 32-bit IEEE 754 floating point number.

MX: 4.1+

Android API: 1+

long Long Integer Causes the corresponding extra data item to be attached to the Intent with a data type of Long Integer. The value provided must therefore be a string representing a valid long integer value between -2^63 and 2^63-1.

MX: 4.1+

Android API: 1+

boolean Boolean Causes the corresponding extra data item to be attached to the Intent with a data type of Boolean. The value provided must therefore be a string representing a valid boolean ("true" or "false") value.

MX: 4.1+

Android API: 1+

char Character Causes the corresponding extra data item to be attached to the Intent with a data type of character. The value provided must therefore be a string containing a single character.

MX: 4.1+

Android API: 1+

short Short Causes the corresponding extra data item to be attached to the Intent with a data type of Short Integer. The value provided must therefore be a string representing a valid short integer value between -2^15 and 2^15-1.

MX: 4.1+

Android API: 1+

double Double Precision Floating Point Causes the corresponding extra data item to be attached to the Intent with a data type of Double Precision Floating Point. The value provided must therefore be a string representing a valid double-precision 64-bit IEEE 754 floating point number.

MX: +

string String Causes the corresponding extra data item to be attached to the Intent with a data type of character sequence. The value provided must therefore be a string containing a sequence of characters. This data type is can be used to supply values comparable to the Character Sequence data type and should be used if the receiver explicitly requires a String instead of a Character Sequence.

MX: 4.1+

Android API: 1+

byte Single Byte Integer Causes the corresponding extra data item to be attached to the Intent with a data type of Single Byte Integer. The value provided must therefore be a string representing a valid single-byte integer value between -2^7 and 2^7-1.

MX: 4.1+

Android API: 1+

Extra Name

Used to enter the extra-data item name(s) to be attached for any extra data item(s) for which a data type other than "none" was specified. Enter multiple Extra Names as ExtraName, Extra1Name, Extra2Name, Extra3Name and Extra4Name.

Note: The Intent framework does not impose specific restrictions on names that can be specified for extra data items. However, Zebra recommends verifying exact Extra Names as expected by the Intent receiver to achieve the desired result.

Parm value input rules:

  • String from 1 - 255 characters

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner" and the Extra Type is NOT "none"

Parm Name: ExtraName

Requires:

  • MX: 4.1+
  • Android API: 1+

Extra Value

Used to enter the value of the extra data item to be attached to the Intent for the corresponding name for which a data type other than "none" was specified. Enter multiple Extra Values as ExtraValue, Extra1Value, Extra2Value, Extra3Value and Extra4Value.

Parm value input rules:

  • String from 1 - 255 characters

Shown if: The Mode is NOT "Cancel" and Action is NOT "Enroll Device Owner" and the Extra Type is NOT "none"

Parm Name: ExtraName

Requires:

  • MX: 4.1+
  • Android API: 1+

Examples

Launch the Main Activity for an Application


<wap-provisioningdoc>
    <characteristic type="Intent" version="4.3" >
        <parm name="Action" value="StartActivity"/>
        <parm name="ActionName" value="android.intent.action.MAIN"/>
        <parm name="Package" value="com.sample.myapp"/>
        <parm name="Class" value="com.sample.myapp.MainActivity"/>
    </characteristic>
</wap-provisioningdoc>

Enroll a Device Owner


<wap-provisioningdoc>
    <characteristic type="Intent" version="7.0" >
        <parm name="Action" value="EnrollDeviceOwner"/>
        <parm name="Package" value="com.symbol.osx.testdpc"/>
        <parm name="Class" value="com.symbol.osx.testdpc.AdminClass"/>
    </characteristic>
</wap-provisioningdoc>