Install App by URI

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

Application install by URI includes the following major activities:

  • Verify the file integrity
  • Copy file and install the app

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.png

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

Type

Asynchronous

Description

Initiates an install process on the specified URI. Responses will be returned in the 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. Specify config options if needed (see API Spec - 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 (e.g. com.myapp.receivers.MyBroadcastReceiver.kt)
callback
reference to an IResponseCallback instance to receive response or error config
config
request configuration options (see Retry Policy ) A String taskId is returned in onScheduled to be used to identify the task.
data
Uri of the application as String
metadata
metadata that client may attach to the calls for further processing

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 ⇧