Getting started
Adding RSS Mobile SDK to your project
In the settings.gradle file at the root of your project, add the SwissSign AG Maven repository:
settings.gradle
repositories {
maven {
url "https://nexus.cntr.swsnet.ch/repository/maven-public-sid/"
}
}In your app/build.gradle file, add the following dependency:
build.gradle
dependencies {
implementation("ch.sysmosoft.swisssign:swisssign-sdk-android-lib:{version}")
}RSS Mobile SDK is supported on Android devices running API level 27 and newer and targeting the latest stable Android version 14 (API 34). Furthermore, the SDK requires apps to enable Java 17 language features to build.
The code below shows an example of the build configuration
build.gradle
android {
compileSdk 34
defaultConfig {
minSdkVersion 29
targetSdkVersion 36
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}Adding required resources
The following strings must be added to the /res/values/strings.xml resource to define texts to be displayed to the user when biometric authentication is needed. An empty value can be used to hide a specific label.
/res/values/strings.xml
<string name="rss_biometric_cancel">Cancel</string>
<string name="rss_biometric_registration_title">Confirm activation</string>
<string name="rss_biometric_sign_consent_token_title">Confirm signature</string>
<string name="rss_biometric_registration_description"></string>
<string name="rss_biometric_registration_subtitle"></string>
<string name="rss_biometric_sign_consent_token_subtitle"></string>
<string name="rss_biometric_sign_consent_token_description"></string>Initialising the SDK
First step before using SDK is to initialise it using the buildRss { } API.
val rss: Rss = buildRss(context) {
rssLicense = "1234" // Mandatory
rssSecServerUrl = "https://..." // Mandatory
rssWorkflowEngineUrl = "https://..." // Optional
rssHttpConfiguration = httpConfig // Optional
transmitDeviceSensitiveData = false // Optional, default false
}
val initialized = rss.isInitialized()
val session = rss.getSessionService(token)Once the SDK is initialised, it's possible to retrieve a SessionService instance for a given OIDC Token response with the rss.getSessionService(tokenResponse) API. See the Services page for more information about the SessionService usage.