Upgrade guide
Upgrading from SDK version 2.x to version 2024.0.x
Updating dependencies
The SDK was previously delivered into two packages:
ch.sysmosoft.sense.sdk:sense-sdk-android-libch.sysmosoft.sense.smartcontract:sense-smartcontract-sdk-android
Both SDKs have been merged together in a single artifact, renamed as below:
com.swisssign.letssign:sense-smartcontract-sdk-android-lib:2024.0.0@aar
Various transitive dependencies have been updated. If you're manually adding the library into your application, please update the dependencies according to the dependency tree provided with the SDK.
Static SDK configuration file is moved to Code
The new SDK requires to be initialized programmatically instead of through the static configuration file sense-config.properties. This file can be removed from your assets folder.
This new singleton configuration class allows a dynamic configuration of the back-end server and HTTP Configuration.
This new configuration class must be initialized before calling SmartContract.initialize(this), as shown below.
SmartContract.configuration().setSecServerUrl(new URL("https://example.com/sense/appserver/Server"));
SmartContract.configuration().setLicense("myLicense");
SmartContract.configuration().setWorkflowEngineUrl(...); // optional
SmartContract.initialize(this);Optional SQLCipher dependency
Starting from version 2024.0.0, SQLCipher is optional and required only when secure storage APIs are being used (through the Services#getSenseContext() API}). By default, the library is not added as a transitive dependency.
If your API does not rely on our secure storage, the SQLCipher library can be removed from your application.
If your application requires the secure storage, you must ensure that the dependency is explicitly added in your classpath:
implementation("net.zetetic:sqlcipher-android:4.6.0@aar") {
transitive = true
}
implementation "androidx.sqlite:sqlite:2.2.0"Explicit usage of Alarms removed
The explicit usage of alarms (permission android.permission.SCHEDULE_EXACT_ALARM), previously used to handle session timer has been removed following Android recommendations.
The SDK uses now an alternative scheduling mechanism to handle session timeout events.
If this permission was explicitly added into your application, it can be safely removed.
Updated minSdkVersion
The SDK now requires Android API 26 (Android 8) as minSdkVersion.