Launch App After Installation

To launch an app after installation is complete, use the performAction() method:

Kotlin
fun performAction(
    packageName: String,
    actionType: String,
    metadata: Bundle = Bundle(),
    callback: IResponseCallback<PerformActionResponse, Error, Progress>? = null
)
PARAMETER
STATUS
TYPE
DESCRIPTION

packageName

Required

String

Package name of the application you want to open.

actionType

Required

String

Type of action to be performed on the packageName. The SDK supports only opening the app. To open an app, use the following format: IgniteActions.LAUNCH.name

metadata

Optional

Bundle

Metadata for additional processing.

callback

Optional

Interface

The DTIS SDK provides the IResponseCallback interface for you to receive asynchronous status updates.

If you do not wish to receive task status notifications via callback, set this parameter to null.

Example

Kotlin
// Initialization

// ...

IgniteServiceSdk.instance().performAction(packageName, IgniteActions.LAUNCH.name, Bundle(), object : IResponseCallback<PerformActionResponse, Error, Progress> {
        override fun onSuccess(result: PerformActionResponse) {
            Log.d(TAG, "Perform Action CallBack Success ${result.application.packageName}")
        }

        override fun onError(error: Error) {
            Log.e(TAG, "Perform Action CallBack Error: ${error.message}")
        }
    })

Last updated