Importing the KnomiMobile-SampleApp libraries to a Project

To include the KnomiMobile-SampleApp SDKs in your application requires three steps:

  1. Update the gradle dependencies and include the AARs in the application lib directory.

    • Add or update the filetree line to include searching for AARs. i.e. api fileTree(dir: ‘libs’, include: [’*.aar’])

    • The dependency section of your application’s gradle may look like the following:

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0'

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation "com.android.support:appcompat-v7:${appCompatVersion}"
    implementation "com.android.support:support-v4:${appCompatVersion}"
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    // JSON
    implementation 'com.google.code.gson:gson:2.8.6'

    def nav_version = "2.5.3"
    implementation "androidx.navigation:navigation-fragment:$nav_version"
    implementation "androidx.navigation:navigation-ui:$nav_version"
    implementation 'androidx.preference:preference:1.2.0'

    implementation "com.android.support:appcompat-v7:${appCompatVersion}"
    implementation "com.android.support:support-v4:${appCompatVersion}"
    implementation "com.google.code.gson:gson:${gsonVersion}@jar"
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation "com.squareup.okio:okio:3.0.0-alpha.6"

    // ViewPager2
    implementation "androidx.viewpager2:viewpager2:1.0.0"

    // Regula
   // implementation 'com.regula.btdevice:api:1.0.367'
    implementation 'com.regula.documentreader.core:fullrfid:6.9.9544'
    implementation('com.regula.documentreader:api:6.9.9346') {
        transitive = true
    }

    def lifecycle_version = "2.5.1"
    // ViewModel
    implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
}