Skip to main content

Customizations

This article guides you on how to customize the Actito SDK to better suit your application’s integration and configuration needs.

Setting keys in code

Instead of relying on the actito-services.json configuration file, which is the file you retrieved in your TransferBox, it is possible to set those in code. If you are using the com.actito.gradle.actito-services Gradle plugin, go ahead and remove it since it requires the configuration file to be present. Furthermore, add the following metadata to your AndroidManifest.xml.

<meta-data
android:name="re.notifica.auto_configuration_enabled"
android:value="false" />

To configure Actito, you must run the following code before any other interactions with the library.

class MainApplication : Application() {

override fun onCreate() {
super.onCreate()

Actito.configure(
context = applicationContext,
applicationKey = "",
applicationSecret = "",
)

// more code ...
}
}

The configure() method should be called before calling Actito.launch() to make sure the correct keys are used. After setting the keys programmatically you can safely delete the actito-services.json file.