Initialize and configure the SDK
Import the Passio Nutrition AI Package
Configure the SDK with the Key you obtained by signing up at https://www.passio.ai/nutrition-ai.
The mode of the PassioStatus defines what is the current status of the configuration process. There are 5 different modes, and they all should be handled by the implementing side.
notReady -> The configuration process hasn't started yet.
failedToConfigure -> There was an error during the configuration process.
isBeingConfigured -> The SDK is still in the configuration process. Normally, you shouldn't receive this mode as a callback to the configure method. If you do please contact our support team.
isDownloadingModels -> The files required by the SDK to work are not present and are currently being downloaded.
isReadyForDetection -> The configuration process is over and all the SDKs functionalities are available.
Request authorization to use the camera and add the
PassioPreview
widget:
Add the method
startFoodDetection()
and register aFoodRecognitionListener
Stop Food Detection on widget
dispose
:
Get nutritional information for food using a
PassioID
as a food identifier:
If at any point you need help from the Passio team, please reach out to us at support@passiolife.com
Last updated