Skip to content

oruamdalo/MacroTracker

Repository files navigation

Macro Tracker

The idea of this application is to have something like MacroFactor or LifeSum, but without all the advanced feature (I guess that's why they are paid apps). So just a macro tracker with BMI and TDEE calculator for the moment.

Note: releases in this repo are going to be built with USDA api key 'DEMO_KEY'. For more information on how to get an API key, see this. Click here for information on rate limiting with this API key. Edit secrets.properties with your own key.

Why

Although many applications like this already exist, I wanted (or maybe needed) something to practice with Android Development because it's changed a lot since I left it.

Features

Currently these are the features provided:

  • Data input (age, sex, height, weight, activity level) with BMI and TDEE calculator
  • Kcal counter during the day
  • Daily weight tracking
  • Weight overall progress
  • Update Plan (TDEE and activity level)
  • Food search via name using USDA api
  • Food search via name using openfoodfacts api
  • Food search via barcode using openfoodfacts api
  • Manual addition of food entry with nutrients
  • Meal suggestions based on products you have at home themealdb [low priority]

Some Images

Here you can find an overview of the application architecture. It's not complete.

Macro and Kcal tracking Food Search Food Details

Dependencies

OpenFoodFacts has an early library for KMM; however, I will stick to the standard APIs.

No too much actually

  • Retrofit, for API communications
  • Room and Proto DataStore, for storing data locally
  • Hilt for Dependency Injection
  • ML Kit and CameraX for barcode scanning (only EAN-8 and EAN-13, most used in Italy for food products)

Warning

The app still requires some testing, code cleaning and better resource management. Not every functionality has been tested and many of them still needs some errors handling.

Future Features

This app is still a WIP, but I am already thinking about something like "food nutrients recognition via nutrients table/list photo". Probably in that case using ML Kit could be useful.

Meal plan calculator could also be achieved with "The Diet Problem" (linear programming) together with some food filtering based on the meal being created (fruits/cereal/dairy for breakfast for example)

About

Macro Nutrients Tracker with BMI and TDEE calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages