No Translation available yet
You have English selected as language but this page has not been translated yet. Translate the page or view the content in the default space language below.
Display default
Follow the instruction below to setup the VIC SDK on your Android Studio project via Maven.
Gradle
- Add the SASIS Maven repository to your project in the settings.gradle.kts file:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
// other repositories
google()
mavenCentral()
// mavenLocal()
// sasis repository
maven {
name = "sasis"
url = uri("https://pkgs.dev.azure.com/SASISAG/VICSDK/_packaging/VICSDK-Android/maven/v1")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
}
- Add the credentials to the gradle.properties file. As username, everything can be used, as password, the provided access token from SASIS should be used.
sasisUsername=anything
sasisPassword=<AccessToken>
- Add the VicSDK dependency
[versions]sasis = "3.1.0"
[libraries]
sasis-vicsdk = { module = "ch.sasis:vicsdk", version.ref = "sasis" }
dependencies {
implementation(libs.sasis.vicsdk)
}
- Enable Compose if not done already
android {
buildFeatures {
compose = true
}
}
Manifest
From 3.1.0:
To support Android 17 the back of the card is now generated as image with the right aspect ratio. Portrait only is not guaranteed anymore, so the android:screenOrientation="portrait" can be deleted.
Before 3.1.0:
The cardview currently only supports portrait-mode. So the Activity displaying the cards should force portrait mode in the manifest.
<activity android:name=".MyCardsActivity"
android:screenOrientation="portrait"></activity>
ProGuard
The following ProGuard rules are required by the SDK to allow minification (not needed from version 3.1.0 anymore)
-keep class com.sun.jna.** { *; }
-keep class ch.sasis.vicsdk.** { *; }