Install Profile

Device Information

You must set the device information including the "identifier“ for the Straic Backoffice. The "userId" is an optional string that can be used for assigning the profile to a user. The "userToken" is an optional string that can be used to verify the user. It is automatically forwarded to the provided webhook URL. The "metadata" is an optional Map<String:String> and can be used for information e.g.: Details for your server, ...

This information is needed to assign your device eSIM profiles or to provide eSIM profiles for installation.

import io.straic.sdk.model.StraicSDKDeviceInformation

val identifier = "Your device identifier"
val userId = "User ID"
val userToken = "User Token"
val metadata = mapOf()

val deviceInformation = StraicSDKDeviceInformation(identifier = identifier, 
                                                    userId = userId,
                                                    userToken = userToken,
                                                    metadata = metadata)

The installEsimProfileByIccid function with ICCID (Integrated Circuit Card Identifier) can be used to return a specific eSIM profile for the given iccid and the success state, or an error.

val iccid = "Integrated Circuit Card Identifier"

StraicSDK.installEsimProfileByIccid(iccid = iccid, 
                             deviceInformation = deviceInformation,
                             resolutionActivity = this) { profile, success, error ->
    Log.i( "StraicSDK", "Profile: $profile")
    Log.i( "StraicSDK", "Success: $success")
    Log.i( "StraicSDK", "Error: $error")     
}

The installEsimProfileByProfileType function with eSIM profile type can be used to return the success state and the next available eSIM profile for the given profile type or an error.

val profileType = "eSIM Profile type"

StraicSDK.installEsimProfileByProfileType(profileType = profileType, 
                             deviceInformation = deviceInformation,
                             resolutionActivity = this) { profile, success, error ->
    Log.i( "StraicSDK", "Profile: $profile")
    Log.i( "StraicSDK", "Success: $success")
    Log.i( "StraicSDK", "Error: $error")     
}

The device operating system will show up as an installation wizard for the user for all install functions.

Last updated