Android Account Linking
The Account Linking SDK lets users connect their online retailer accounts so the app can extract and parse their order history. It supports digital and in-store orders from a growing list of retailers.
Installation
1. Add the Maven Repository
Ensure mavenCentral() is included in your repositories block:
repositories {
// ...
mavenCentral()
}
2. Add Dependencies
- Kotlin
- Groovy
dependencies {
implementation(platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.8.7"))
implementation("com.microblink.blinkreceipt:blinkreceipt-account-linking")
}
dependencies {
implementation platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.8.7")
implementation "com.microblink.blinkreceipt:blinkreceipt-account-linking"
}
Setting License Keys
License and Product Intelligence keys are available from your Actual account team.
Via AndroidManifest.xml
<meta-data
android:name="com.microblink.ProductIntelligence"
android:value="YOUR_PRODUCT_INTELLIGENCE_KEY" />
Programmatically
Set keys in your Application.onCreate() before initializing the SDK:
- Kotlin
- Java
BlinkReceiptLinkingSdk.initialize(
context = applicationContext,
complete = callback,
license = "YOUR_LICENSE_KEY", // License Key set on initialization
)
BlinkReceiptLinkingSdk.initialize(this, new InitializeCallback() {
@Override
public void onComplete() {
// SDK ready
}
@Override
public void onException(@NonNull Throwable throwable) {
// log and handle initialization failure
}
}, "YOUR_LICENSE_KEY"); // License Key set on initialization
Initialization
Initialize the SDK in your Application.onCreate():
- Kotlin
- Java
BlinkReceiptLinkingSdk.initialize(this, object : InitializeCallback {
override fun onComplete() {
// SDK ready
}
override fun onException(throwable: Throwable) {
// log and handle initialization failure
}
})
BlinkReceiptLinkingSdk.initialize(this, new InitializeCallback() {
@Override
public void onComplete() {
// SDK ready
}
@Override
public void onException(@NonNull Throwable throwable) {
// log and handle initialization failure
}
});