Include the library

The Passio Android SDK is shipped in the form of an .aar file.

Download the .aar from our distribution repository

  • Visit the releases page of the Android-Passio-SDK-Distribution GitHub repository. Download the passiolib-release.aar file from the latest release.

  • If you don't have access to the repository please contact our support team at

Include the .aar in your Android Studio project

To include the .aar file into your project go to the module that will contain the food recognition feature. Place the .aar file in the libs folder of the module. If the libs folder is missing, create one. Reference the .aar file in the build.gradle file of the implementing module.

implementation files('libs/passiolib-release.aar')

Sync Project with Gradle Files and be sure that you can reference the PassioSDK class within your code.


Passio Android SDK is powered by TensorFlow and FirebaseVision with the camera being managed by CameraX. Add the dependencies to these three projects by adding these lines to the module's build.gradle file.

dependencies {
    // TensorFlow
    implementation 'org.tensorflow:tensorflow-lite:2.8.0'
    implementation 'org.tensorflow:tensorflow-lite-metadata:0.4.0'

    // CameraX
    def camerax_version = "1.3.0-alpha12"
    implementation "$camerax_version"
    implementation "$camerax_version"
    implementation "$camerax_version"
    implementation ''
    implementation ''

    // Barcode and OCR
    implementation ''
    implementation ''

In order for the SDK to work add the following lines to the android section of the module's build.gradle file.

android {
    aaptOptions {
        noCompress "passiosecure"
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

Running Sync Project with Gradle Files will enable access to the SDK.

If at any point you need help from the Passio team, please reach out to us at

Last updated