SDK Integration

Integrating the Pensa SDK into your Android project is simple. Follow the steps below to add the SDK and enable advanced shelf recognition features in your app:

1- Add Repositories

Ensure the required repositories are added to your settings.gradle file.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        maven {
            url = uri("https://sdk.pensasystems.net/pensa-sdk-android/")
        }
    }
}

2- Add the SDK Dependency

Include the SDK dependency in your app's build.gradle file.

3- Sync the Project

After adding the required dependencies and repositories, sync your Gradle project to ensure everything is correctly configured.

Permissions

The Pensa SDK requires the following permissions to ensure smooth functionality:

  • ACCESS_NETWORK_STATE: Allows the SDK to check the network status to ensure reliable API requests and handle offline scenarios effectively.

  • INTERNET: Enables the SDK to communicate with servers for uploading scans and fetching necessary data.

  • CAMERA: Grants the SDK access to the device's camera for capturing shelf scans.

  • FLASHLIGHT: Allows the SDK to control the flashlight for better visibility while capturing scans in low-light environments.

  • POST_NOTIFICATIONS: Enables the SDK to send notifications for important updates, such as upload progress.

Last updated

Was this helpful?