Skip to content

Releases: Passiolife/Passio-Nutrition-AI-Android-SDK-Distribution

Passio SDK v3.1.0

17 May 16:43
Compare
Choose a tag to compare

V3.1.0

Introducing the Nutrition AI Advisor!

  • To access the API od the Advisor use NutritionAdvisor.instance
fun configure(
    appContext: Context,
    licenseKey: String,
    callback: (result: PassioResult<Any>) -> Unit
)

fun initConversation(callback: (result: PassioResult<Any>) -> Unit)

fun sendMessage(
    message: String,
    callback: (response: PassioResult<PassioAdvisorResponse>) -> Unit
)

fun sendImage(
    bitmap: Bitmap,
    callback: (response: PassioResult<PassioAdvisorResponse>) -> Unit
)

fun fetchIngredients(
    response: PassioAdvisorResponse,
    callback: (response: PassioResult<PassioAdvisorResponse>) -> Unit
)

Refactored APIs

  • Nutrition facts scanning has been separated out in different recognition flow. The FoodDetectionConfiguration object no longer has the detectNutritionFacts parameter.
  • The scanning now is controled by these new functions
fun startNutritionFactsDetection(listener: NutritionFactsRecognitionListener)

fun stopNutritionFactsDetection()

interface NutritionFactsRecognitionListener {
    fun onRecognitionResult(nutritionFacts: PassioNutritionFacts?, text: String)
}

Added APIs

  • Added speech recognition API that retrieves a list of recognized foods from the input text query.
fun recognizeSpeechRemote(text: String, callback: (result: List<PassioSpeechRecognitionModel>) -> Unit)
  • Added LLM image detection, that works remotely through Passio's backend.
fun recognizeImageRemote(bitmap: Bitmap, callback: (result: List<PassioAdvisorFoodInfo>) -> Unit)
  • Added a function to retrieve a PassioFoodItem for a v2 PassioID
fun fetchFoodItemLegacy(passioID: PassioID, callback: (foodItem: PassioFoodItem?) -> Unit)

Passio SDK v3.0.3-patch1

30 Apr 06:06
Compare
Choose a tag to compare

Passio SDK v3.0.3-patch1

  • Refactored PassioSearchNutritionPreview
data class PassioSearchNutritionPreview(
    val calories: Int,
    val carbs: Double,
    val protein: Double,
    val fat: Double,
    val servingUnit: String,
    val servingQuantity: Double,
    val weightUnit: String,
    val weightQuantity: Double
)
  • Added refCode as an attribute to the PassioFoodItem and PassioIngredient classes.
  • Added method to fetch a food item using just the refCode attribute
fun fetchFoodItemForRefCode(refCode: String, callback: (foodItem: PassioFoodItem?) -> Unit)

Passio SDK v3.0.3

19 Apr 15:14
Compare
Choose a tag to compare

V3.0.3

Added APIs

  • Added two functions to fetch a list of meal plans and fetch a meal plan for a certain day.
fun fetchMealPlans(callback: (result: List<PassioMealPlan>) -> Unit)

fun fetchMealPlanForDay(
    mealPlanLabel: String,
    day: Int,
    callback: (result: List<PassioMealPlanItem>) -> Unit
)
  • Added values for carbs, protein and fat in the PassioSearchNutritionPreview data class.

Refactored APIs

  • PassioSearchResult was renamed to PassioFoodDataInfo, fetchFoodItemForSearchResult was renamed to fetchFoodItemForDataInfo.

  • fetchFoodItemForSuggestion was removed. Instead fetchFoodItemForDataInfo is used.

  • MealTime was renamed to PassioMealTime.

Passio SDK v3.0.2

22 Mar 16:17
Compare
Choose a tag to compare

Added APIs

  • Added API to fetch suggestion for a certain meal time. To fetch a the full nutritional data for a suggestion item use fetchFoodItemForSuggestion.
fun fetchSuggestions(
    mealTime: MealTime,
    callback: (results: List<PassioSearchResult>) -> Unit
)

enum class MealTime(val mealName: String) {
    BREAKFAST("breakfast"),
    LUNCH("lunch"),
    DINNER("dinner"),
    SNACK("snack")
}

fun fetchFoodItemForSuggestion(
    suggestion: PassioSearchResult,
    callback: (foodItem: PassioFoodItem?) -> Unit
)

Refactored APIs

Renamed fetchSearchResult to fetchFoodItemForSearchResult.

Passio SDK v3.0.2-patch1

03 Apr 18:33
Compare
Choose a tag to compare
Pre-release
  • Added macros to PassioSearchNutritionPreview

Passio SDK v2.3.15-patch1

27 Mar 17:09
Compare
Choose a tag to compare
  • Fixed issue with number format exception on some locales

Passio SDK v3.0.1

23 Feb 11:08
Compare
Choose a tag to compare

V3.0.1

Added APIs

  • Reintroduced support for alternatives to visual results. Every detected candidate will have a list of alternatives: List<DetectedCandidate>. These alternatives represent contextually similar foods. Example: If the DetectadeCandidate would be "milk", than the list of alternatives would include items like "soy milk", "almond milk", etc.

  • Also, the interface FoodRecognitionListener might return multiple detected candidates, ordered by confidence. These multiple candidates represent the top result that our recognition system is predicting, but also other results that are visually similar to the top result. Example: If the first result in the list of detectedCandidates is "coffee", there might be more results in the list that are visually simillar to coffee like "coke", "black tea", "chocolate milk", etc.

  • Added PassioSearchNutritionPreview to the PassioSearchResult, for the ability to show the default serving sizes in the search functionality.

data class PassioSearchNutritionPreview(
    val calories: Int,
    val servingUnit: String,
    val servingQuantity: Double,
    val servingWeight: String
)

Passio SDK v3.0.0-alpha

31 Jan 21:01
Compare
Choose a tag to compare

V3.0.0-alpha

Version 3 of the Passio SDK introduces major changes to the nutritional data class and the search functionality. The SDK no longer supports offline work, there is no more local database.

Deprecated APIs

  • lookupNameFor, lookupPassioAttributesFor, lookupPassioAttributesForName and lookupAllDescendantsFor have been removed since these function were querying the local database

  • PassioIDAttributes, PassioFoodItemData and PassioFoodRecipe have been removed. The new data model that will handle nutritional data is called PassioFoodItem

Refactored APIs

  • searchForFood now returns PassioSearchResult and a list of search options. The PassioSearchResult represent a specific food item associated with the search term, while search options provide a list of possible suggested search terms connected to the input term.

  • lookupIconFor has been deprecated, the correct function to use is lookupIconsFor

  • fetchPassioIDAttributesForBarcode and fetchPassioIDAttributesForPackagedFood have been replaced with fetchFoodItemForProductCode than now returns a PassioFoodItem result

  • DetectedCandidate now has an attribute called foodName

  • FoodRecognitionListener method onRecognitionResults can now return nullable FoodCandidates

  • fetchNutrientsFor has been renamed to fetchInflammatoryEffectData, and PassioNutrient has been renamed to InflammatoryEffectData

Added APIs

  • fetchSearchResult returns a PassioFoodItem object for a given PassioSearchResult

  • fetchFoodItemForPassioID returns a PassioFoodItem object for a given passioID corresponding to a result from the visual detection

  • Added class PassioSearchResult that represents a result from the searchForFood function

  • Added class PassioFoodItem that represent a food item from the Passio Nutritional database. It has a list of PassioIngredients, with their respective PassioFoodAmounts and PassioNutrients

Passio SDK v2.3.15

19 Dec 14:31
Compare
Choose a tag to compare

V2.3.15

Deprecated APIs

  • Removed support for language packs, they will be available in version 3.0.0. Removed enableLanguagePack from the PassioConfiguration object, and the setSDKLanguage.

Added APIs

  • Fetch a map of nutrients for a 100 grams of a specific food item
fun fetchNutrientsFor(passioID: PassioID, onResult: (nutrients: List<PassioNutrient>?) -> Unit)

data class PassioNutrient(
    val name: String,
    val amount: Double,
    val unit: String,
    val inflammatoryEffectScore: Double,
)

Passio SDK v2.3.13

15 Nov 18:20
Compare
Choose a tag to compare

V2.3.13

  • Add support for German language pack

Added APIs

  • New flag in the PassioConfiguration object called enableLanguagePack. If set to true, after SDK initializtion, if the phone locale is set to German will apply the German language pack. English is default.

  • Added new API to set the language of the food items from the nutritional database. If set to AUTO, the phone locale is chosen.

fun setSDKLanguage(
    context: Context,
    language: SDKLanguage,
    result: (languageSet: SDKLanguage?) -> Unit
)

enum class SDKLanguage(val code: String) {
    AUTO("auto"),
    EN("en"),
    DE("de"),
}