Migration from SDK version 1.4.x to 2.x
Before you continue, please make sure you have a new key for version 2.x. The 1.4.x will not work with 2.x SDK!
Dependencies
Changes to the build.gradle file:
API Changes
PassioMode.IS_AUTO_UPDATING
renamed toPassioMode.IS_DOWNLOADING_MODELS
PassioMode.IS_READY_FOR_NUTRITION
was removed.PassioSDK.instance.setDownloadListener
was removed. Instead, the download process is traced through thePassioStatusListener
FoodDetectionConfiguration.detectOCR
renamed todetectPackagedFood
FoodDetectionConfiguration.detectLogos
was removed.PassioSDK.instance.lookupImageForFilename, lookupPassioIDFor, lookupAlternativesFor, lookupAllSiblingsFor, lookupParentFor, lookupAllFoodItemsInDatabase, lookupAllPassioIDs, lookupAllVisuallyRecognizableFoodItems
were removedPassioSDK.instance.searchForFood
now returns a list of Pair<passioID, food name>PassioSDK.instance.lookupImageFor
was separated into two functions: 1. Local image lookup:lookupIconFor
2. Network image fetch:fetchIconFor
Nutrients in the
PassioFoodItemData
have been refactored fromDouble
toUnitMass
If at any point you need help from the Passio team, please reach out to us at support@passiolife.com
Last updated