- 04 Dec 2024
- 2 Minutes à lire
- SombreLumière
- PDF
Integration of the FIDO ASMs on Android
- Mis à jour le 04 Dec 2024
- 2 Minutes à lire
- SombreLumière
- PDF
Before you integrate the FIDO ASM with the Tutorial App Plus application on iOS and/or Android, ensure that the FIDO Server has been configured correctly. For more information, see Configuration of the FIDO Server and the NokNok Labs documentation.
Configuration steps
To integrate the OneSpanFIDO ASMs on Android with the Tutorial App Plus application
Make sure that the value for minSdkVersion (which you can find in the main build.gradle file) of the Tutorial App Plus is equal to or higher than the value for minSdkVersion of the ASMs—see Supported platforms.
Make the following changes to the gradle file:
Navigate to project>root>build.gradle and change the classpath from 'com.android.tools.build:gradle:4.0.1' to 'com.android.tools.build:gradle:8.2.2'.
Navigate to gradle.properties and change 'android.jetifier.blacklist = pass-1.2.2' to 'android.jetifier.ignorelist = pass-1.2.2'.
Navigate to app>build.gradle and add the namespace' com.noknok.android.tutorialappplus' in android{}.
Change the gradle-wrapper.properties file to use gradle 6.1.1:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
Change the gradle to use Java 11:
In Android Studio, go to File>Settings>Build, Execution, Deployment>Build Tools>Gradle and select Java 11 (or JDK 11).Copy the ASM libraries (.aar files) and their dependencies to a directory in the Tutorial App, e.g. app/libs.
Integrate the Presence ASM in your app—see Integration of the Presence ASM for more detailed information.
Integrate the User Input ASM (PIN/password) in your app—see Integration of the User Input ASM for more detailed information.
Integrate the Native Biometric Authentication ASM—see Integration of the Native Biometric Authentication ASM for more detailed information.
(OPTIONAL) Embed an authenticator—see Embedding of an authenticator for more detailed information.
After the integration of the FIDO ASMs is completed, raw/asmdescriptors.json should look like this:
{ "descriptorclass":[ "com.vasco.fido.uaf.asm.biometric.NativeBiometricAuthenticationASMDescriptor", "com.vasco.fido.uaf.asm.presence.PresenceASMDescriptor", "com.vasco.fido.uaf.asm.userinput.PinASMDescriptor", "com.vasco.fido.uaf.asm.userinput.PasswordASMDescriptor" ] }
Configure your server endpoint in the TutorialApp class: modify the host variable:
public static final String host = "https://<your endpoint>";
In build.gradle, add the following inside the android{} block:
packagingOptions { exclude 'META-INF/lib_release.kotlin_module' }
In app/build.gradle, remove the line dependency 'api "com.noknok:asm_spass2:7.0.2-326"' and add the following lines inside dependencies{} block:
constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") } implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") } } api files('libs/FIDOUAFCommonASM.aar') api files('libs/FIDOUAFNativeBiometricAuthenticationASM.aar') api files('libs/FIDOUAFPresenceASM.aar') api files('libs/FIDOUAFUserInputASM.aar') api files('libs/BiometricSensorSDK.aar') api files('libs/DeviceBindingSDK.aar') api files('libs/SecureStorageSDK.aar') api files('libs/UtilitiesSDK.aar') api "androidx.biometric:biometric:1.1.0" api "androidx.constraintlayout:constraintlayout:2.0.4" implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
Customize the transaction screen—Common ASM; see Integration of the Common ASM—Customization of the Transaction Screen for more detailed information.
Customize the anti-hammering protection; see Customization of the Anti-hammering Protection for more detailed information.
When working with Android version 14 (API level 34) and later, make the following changes in the application:
Replace all instances of 'switch' with 'if else'.
Navigate to TutorialPlusSuggestionUI.java class and change line 34: replace 'builder.setMessage(R.string.nnl_appsdk_plus_use_platform_authenticator);' with 'builder.setMessage(com.noknok.android.client.appsdk_plus.R.string.nnl_appsdk_plus_use_platform_authenticator);'.
Add android:exported = 'true' where needed.
In android>AndroidManifest, add '<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>'.
Navigate to app build.gradle and change the api from 'net.openid:appauth:0.6.0' to 'net.openid:appauth:0.7.0'
Navigate to android>AndroidManifest.xml and add the following:
<receiver android:name="com.huawei.hms.support.api.push.PushMsgReceiver" android:exported="true"/>
<receiver android:name="com.huawei.hms.support.api.push.PushReceiver" android:exported="true"/>
In app build.gradle, remove 'com.noknok:asm_spass2:7.0.2-326'.
Run the Tutorial App Plus application.