Welcome to Nutrition UI Module! 🍎🥗
Welcome to the Nutrition UI Module repository! This Android library provides a comprehensive set of UI components for building an engaging nutrition tracking experience. The module includes advanced features like AI-powered photo recognition of foods, making it easier for users to log their meals and monitor their nutritional intake.
- Download the .aar from the latest release
- Import the .aar into your project
- Add the dependencies located in the build.gradle file of library module. Be sure to check the repositories needed to pull the dependencies
- Sync files with gradle and make sure you can access the Passio classes
- Before starting the UI Module make sure to configure the SDK using
PassioSDK.instance.configure()
. Use the SDK provided by the Passio Platform. The configure must returnIS_READY_FOR_DETECTION
for the UI Module to work properly. - Start the UI Module by calling:
NutritionUIModule.launch(this) //Starts the activity of the UI Module
The NutritionUIModule.launch
also accepts a PassioConnector
interface to control the data flow of the UI Module. Create an implementation of the interface by providing functions that will store and retrieve data needed by the Module. Then pass the implementation to the launch functions and all of the data flow will use that specific connector.
Any of the color defined in the .xml file can be overridden in the app to change the appearance of the module.
Example of ids that control the navigation bar and toolbar:
<color name="passio_bottom_navigation_background">#FFFFFF</color>
<color name="passio_bottom_navigation_selected">@color/passio_primary</color>
<color name="passio_bottom_navigation_deselected">@color/passio_gray300</color>
<color name="passio_toolbar_background">#FFFFFF</color>
<color name="passio_toolbar_title">#000000</color>