### Launch App Example Source: https://docs.digitalturbine.com/dt-ignite/ignite-services/sdk-reference/launch-app-after-installation Use this example to launch an app after installation. Ensure IgniteServiceSdk is initialized and provide the package name and IgniteActions.LAUNCH.name. A callback is included to handle success or error responses. ```kotlin // Initialization // ... IgniteServiceSdk.instance().performAction(packageName, IgniteActions.LAUNCH.name, Bundle(), object : IResponseCallback { 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}") } }) ``` -------------------------------- ### Install App by URI with Callback Source: https://docs.digitalturbine.com/dt-ignite/ignite-services/sdk-reference/receive-installation-notifications Use this method to install an app from a URI and receive installation status updates through the `IResponseCallback` interface. Ensure you implement the callback methods to handle different stages of the installation process. ```Kotlin val file = File("${context.filesDir}", "MyFunGame.apk") val uriString = file.toUri().toString() IgniteServiceSdk.instance().install(uriString, buildSingleInstallationCallback()) ``` ```Kotlin private fun buildSingleInstallationCallback() = object : IResponseCallback { override fun onScheduled(taskInfo: TaskInfo) { Log.i(TAG, "Install application onScheduled(): taskId=${taskInfo.taskId}") // Store task id when scheduled to track it later if needed currentInstallTask = taskInfo.taskId } override fun onStart(taskInfo: TaskInfo) { Log.i(TAG, "Install application onStart(): taskId=${taskInfo.taskId}") // E.g. show indefinite progress as application installation task started showProgress() } override fun onProgress(progress: InstallationProgress) = with(progress) { Log.d(TAG, "Install application onProgress(): taskId=${taskId}, appId=${applicationId}, progress=${value}, action=$action") // E.g. show progress as application started donwload and installation showProgress() // 0 stands for download progress // 1 stands for install progress when (action) { 0 -> updateDownloadProgress(value) 1 -> updateInstallProgress(value) } } override fun onSuccess(result: InstallationResponse) { Log.d(TAG, "Install application onSuccess(): taskId=${result.taskId}, appId=${result.applicationId}, package=${result.packageName}") // E.g. hide progress as application is installed succesfully hideProgress() } override fun onError(error: Error) { Log.e(TAG, "Install application onError(): ${error.message}") hideProgress() } private fun showProgress() = progressBar?.visibility = View.VISIBLE private fun hideProgress() = progressBar?.visibility = View.GONE } ``` -------------------------------- ### Start SDK with Virtual Currency Delegates (C#) Source: https://docs.digitalturbine.com/dt-offer-wall/publishers/dt-offer-wall-sdk/sdk-apis Define delegate handlers for virtual currency responses and errors, then start the SDK with your app ID and secret token. This setup is for Unity. ```csharp public delegate void VirtualCurrencyResponseHandler(VirtualCurrencySuccessfulResponse response); public delegate void VirtualCurrencyErrorHandler(VirtualCurrencyErrorResponse response); OfferWall.StartSDK(appId: "appId", token: "secret_token"); ``` -------------------------------- ### install() Method Source: https://docs.digitalturbine.com/dt-ignite/ignite-services/sdk-reference/install-app The install method initiates the installation process for a target application using the DTIS SDK. ```APIDOC ## install() ### Description Use the install() method to specify the target app you want to download. You can specify the target app by its unique package name or its APK file URI. ### Parameters - **data** (String) - Required - The unique package name or APK file URI of the target app. - **callback** (IResponseCallback) - Optional - Callback for installation response, errors, and progress. - **metadata** (Bundle) - Optional - Additional metadata for the installation request. - **action** (Bundle) - Optional - Action parameters for the installation request. - **config** (RequestConfig) - Optional - Configuration settings for the request. ### Request Example ```kotlin install("com.example.app", callback = myCallback) ``` ``` -------------------------------- ### Install SDK and Dependencies Source: https://docs.digitalturbine.com/dt-exchange/publishers/sdk-configuration/integrating-the-ios-sdk Execute this command to install the SDK and its dependencies, and generate an Xcode workspace file. ```bash pod install --repo-update ``` -------------------------------- ### Full Integration Example in Kotlin Source: https://docs.digitalturbine.com/dt-ignite/ignite-services/getting-started-with-the-dt-ignite-services-sdk This Kotlin code demonstrates a full integration with the DTIS SDK. It shows how to initialize the SDK, connect to the service, call the 'version' function, and initiate an app installation. Ensure you handle callbacks for connection status and installation results. ```kotlin class MainActivity : AppCompatActivity(), IConnectionCallback { // Remember instance or you can call IgniteServiceSdk.instance() lateinit var igniteService: IIgniteService override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) igniteService = IgniteService(applicationContext) igniteService.connect(this) // Call remote function on button click findViewById