For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

Latest Android SDK version: 3.3.1 — see the Changelog for release notes. The SDK is published on Maven Central as ai.passio.passiosdk:nutrition-ai.

Overview

The Passio Nutrition AI Android SDK (ai.passio.passiosdk:nutrition-ai) provides food recognition and nutrition intelligence for Android apps.

At a high level, this SDK gives you:

  • Camera integration (CameraX-backed) for live capture and barcode scanning.

  • Remote food recognition from images.

  • Nutrition/food search and food item retrieval.

  • Speech-to-meal parsing.

  • Meal suggestions and meal plan generation.

  • Nutrition Advisor conversational APIs.

  • Food reporting and user-submitted food APIs.

Requirements

Requirement
Value

Android min SDK

26 (Android 8.0+)

Compile SDK

35 (recommended)

CameraX

1.4.0

ML Kit text recognition

19.0.0

ML Kit barcode scanning

18.3.0

Camera permission

Required for scanner/preview workflows

Internet access

Required for license/token and most APIs

Passio SDK key

Required for production use

Core Concepts

  1. PassioSDK.instance

  • Singleton entry point for all SDK functionality.

  • All calls should be made from the main thread; results are delivered on the main thread.

  1. PassioConfiguration

  • Startup configuration object passed to configure(...).

  • Key options: sdkDownloadsModels, remoteOnly, proxyUrl, proxyHeaders.

  1. PassioStatus / PassioMode

  • Returned by configure(...).

  • Modes: NOT_READY, FAILED_TO_CONFIGURE, IS_BEING_CONFIGURED, IS_DOWNLOADING_MODELS, IS_READY_FOR_DETECTION.

  1. PassioResult<T>

  • Sealed result wrapper: PassioResult.Success(value) or PassioResult.Error(message).

  1. PassioFoodItem

  • Primary nutrition model for fully resolved food data.

  • Includes amounts, serving units, ingredients, and nutrient accessors.

Quick Start Flow

  1. Add the SDK dependency to your app.

  2. Request camera permission at runtime.

  3. Configure the SDK with PassioConfiguration.

  4. Wait for PassioMode.IS_READY_FOR_DETECTION.

  5. Start camera with a PassioCameraViewProvider.

  6. Call APIs like recognizeImageRemote, searchForFood, fetchFoodItemForRefCode, or startBarcodeScanning.

Minimal Setup Example

Last updated