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:

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