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!
Changes to the build.gradle file:
PassioMode.IS_AUTO_UPDATING
renamed to PassioMode.IS_DOWNLOADING_MODELS
PassioMode.IS_READY_FOR_NUTRITION
was removed.
PassioSDK.instance.setDownloadListener
was removed. Instead, the download process is traced through the PassioStatusListener
FoodDetectionConfiguration.detectOCR
renamed to detectPackagedFood
FoodDetectionConfiguration.detectLogos
was removed.
PassioSDK.instance.lookupImageForFilename, lookupPassioIDFor, lookupAlternativesFor, lookupAllSiblingsFor, lookupParentFor, lookupAllFoodItemsInDatabase, lookupAllPassioIDs, lookupAllVisuallyRecognizableFoodItems
were removed
PassioSDK.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 from Double
to UnitMass
If at any point you need help from the Passio team, please reach out to us at support@passiolife.com