Getting Started
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
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
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.
PassioConfiguration
Startup configuration object passed to
configure(...).Key options:
sdkDownloadsModels,remoteOnly,proxyUrl,proxyHeaders.
PassioStatus/PassioMode
Returned by
configure(...).Modes:
NOT_READY,FAILED_TO_CONFIGURE,IS_BEING_CONFIGURED,IS_DOWNLOADING_MODELS,IS_READY_FOR_DETECTION.
PassioResult<T>
Sealed result wrapper:
PassioResult.Success(value)orPassioResult.Error(message).
PassioFoodItem
Primary nutrition model for fully resolved food data.
Includes amounts, serving units, ingredients, and nutrient accessors.
Quick Start Flow
Add the SDK dependency to your app.
Request camera permission at runtime.
Configure the SDK with
PassioConfiguration.Wait for
PassioMode.IS_READY_FOR_DETECTION.Start camera with a
PassioCameraViewProvider.Call APIs like
recognizeImageRemote,searchForFood,fetchFoodItemForRefCode, orstartBarcodeScanning.
Minimal Setup Example
Read Next
Last updated