Install App by Package Name

To install the app the client should be connected and authenticated. When app install is triggered from the client, Ignite SDK executes the task to install the app. Before installing Ignite performs authorization check (isAuthorized? method on the following diagram). For more information about client authorization, see Authentication Guide.

Application install by package name includes the following major activities:

  • Check if client is allowed specified package name
  • Download and install the app by package name

The following diagram shows the sequence of calls and actions to install an application by URI via the Ignite Services Client SDK.

_Epic_Games_Sequence_Diagram_Install_by_Package.png

fun install(
  data: String, 
  callback: IResponseCallback<InstallationResponse, Error, InstallationProgress>? = null, 
  metadata: Bundle = Bundle(), 
  action: Bundle = Bundle(), 
  config: RequestConfig = RequestConfig()
)

Type

Asynchronous

Description

Initiates a download and install process on the specified package name. Responses will be onSuccess() callback function of IResponseCallback. The onError() callback function will return error responses. Status and progress information can be tracked in onScheduled(), onProgress(), and onStart() callbacks and will also be broadcasted to the Android BroadcastReceiver identified by the receiver parameter. If needed, configure retry options. For more information about configuring retry options, see Retry Policy.

Parameters

action
contains information for a custom broadcast to be triggered on task completion. Specify fully qualified class name of Android BroadcastReceiver to receive status and progress updates as receiver (for example: com.myapp.receivers.MyBroadcastReceiver.kt)
callback
reference to an IResponseCallback instance to receive response or error config
data
package name of the application as String
metadata
metadata that client may attach to the calls for further processing
request
request configuration options for retries. A String taskId is returned in onScheduled to be used to identify the task. For more information about configuring retry options, see Retry Policy.

Install Response Callback

IgniteServiceSdk.instance().install(data, object:
                IResponseCallback<Response, Error> {
                override fun onSuccess(result: Response) {
                    //interact with generic response
                }

                override fun onError(error: Error) {
                    //interact with generic error
                }
            })

Back to Top ⇧