Project Integration and Instantiation

Please follow the Project Integration and Initialization, R8/Proguard, and the application class/manifest step in the Scanning Your First Receipt sections to properly add and initialize recognizer sdk.

To add the sdk to your android project please follow these steps:

  1. Add the following maven repository to your build.gradle or settings.gradle, depending on your implementation:
repositories {
  maven { url  "https://maven.microblink.com" }
}
  1. Add the following to your dependency section in your app build.gradle.
dependencies {
    implementation(platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.8.3"))

    implementation("com.microblink.blinkreceipt:blinkreceipt-digital")
    implementation("com.microblink.blinkreceipt:blinkreceipt-recognizer")
}

Initialize the BlinkReceiptDigitalSdk in your application class.

class BlinkApplication : Application() {

    override fun onCreate() {
        super.onCreate()

        BlinkReceiptDigitalSdk.initialize(this, object : InitializeCallback {

            override fun onComplete() {

            }

            override fun onException(e: Throwable) {

            }

        })
    }
}