---
updatedAt: 2026-05-29T11:23:50.000Z
agentTools:
  projectIndex: https://developer.scantopay.io/llms.txt
---

# Installation

Add Lib Lite to your Android project — Gradle setup, manifest, dependencies.

This page walks through getting the Lib Lite AAR into your Android project and ready to invoke. Once you've finished here, jump to [Payments](android-in-app-payments) for the first integration call.

***

## Step 1 — Get the AAR

Email <support@scantopay.io> with your merchant ID and app package name. You'll receive a signed download link for `liblite-release.aar`.

See [SDK downloads](../in-app-sdk-downloads) for distribution details.

***

## Step 2 — Drop the AAR into your project

Place the AAR in a `libs/` folder at your project root:

```
your-app/
├── app/
│   ├── build.gradle
│   ├── src/
│   └── libs/
│       └── liblite-release.aar
└── ...
```

***

## Step 3 — Configure Gradle

In your module-level `build.gradle` (typically `app/build.gradle`), add a custom flat-directory repository pointing at `libs/`:

```groovy
repositories {
    flatDir {
        dirs 'libs'
    }
}
```

Then declare the Lib Lite dependency and the three required transitive libraries:

```groovy
dependencies {
    implementation(name: 'liblite-release', ext: 'aar')

    implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.2'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.android.gms:play-services-auth-api-phone:16.0.0'
}
```

Sync Gradle. If the AAR resolves, you're past the hardest part.

***

## Step 4 — minSdkVersion

Set your `minSdkVersion` to 21 or higher:

```groovy
android {
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 34
    }
}
```

***

## Step 5 — Compute your SMS hash

Lib Lite uses Google's SMS Retriever API to auto-fill OTPs during card registration. You need an SMS hash that ties OTPs to your app.

Generate it per [Google's official guide](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string). The hash is an 11-character string you'll pass to the SDK as `LibLiteActivity.IN_HASH` on every payment invocation.

Without a correct hash, OTP retrieval falls back to manual entry — the integration still works, but the UX is slower.

***

## Step 6 — Manifest entries (Pay-by-App only)

If you're using the [Pay-by-App](android-in-app-pay-by-app-button) flow, add the `PayByAppActivity` and its intent filter to your `AndroidManifest.xml`:

```xml
<activity
    xmlns:tools="http://schemas.android.com/tools"
    android:name="com.eftcorp.liblite.PayByAppActivity"
    android:exported="true"
    tools:node="merge">

    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data
            android:host="@string/deeplink_host"
            android:pathPrefix="@string/deeplink_path_prefix"
            android:scheme="@string/deeplink_scheme" />
    </intent-filter>
</activity>
```

And the matching string resources in `res/values/strings.xml`:

```xml
<string name="deeplink_scheme">https</string>
<string name="deeplink_host">sample.com</string>
<string name="deeplink_path_prefix">/prefix</string>
```

Replace the values with your own app's universal-link domain. Details in [Pay-by-App button](android-in-app-pay-by-app-button).

***

## Step 7 — Permissions

Lib Lite requests permissions at runtime as it needs them. You don't have to pre-declare anything beyond what your app already does.

The SDK may request:

| Permission | When                                                                          |
| ---------- | ----------------------------------------------------------------------------- |
| Camera     | Optional — for QR scanning at registration                                    |
| Location   | Fraud-screening on first card registration                                    |
| SMS read   | OTP retrieval during card registration (only if SMS Retriever is unavailable) |

***

## Step 8 — ProGuard / R8

If you're using code shrinking, add the following keep rule to your `proguard-rules.pro`:

```
-keep class com.eftcorp.liblite.** { *; }
```

This protects the SDK's public API from being obfuscated.

***

## Step 9 — Verify the install

Build and run. In your activity, try the minimal invocation:

```java
Intent intent = new Intent(this, LibLiteActivity.class);
intent.putExtra(LibLiteActivity.IN_API_KEY, "YOUR_TEST_API_KEY");
intent.putExtra(LibLiteActivity.IN_SYSTEM, "TEST");
// You'll need a real code from /code to actually transact
```

If the activity launches without a class-not-found error, the integration is wired correctly.

***

## What's next

* **Make your first payment** → [Payments](android-in-app-payments)
* **Use the drop-in button** → [Pay-by-Card button](android-in-app-pay-by-card-button)
* **Show a progress dialog while creating a code** → [Loading dialog](android-in-app-loading-dialog)
* **Result codes and errors** → [Errors](android-in-app-errors)