Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Track Calories App

Hello, I am a beginner and I want to build a track calories and training diary app in Android that has a database and allows the user to add in their favorite food as well as the Macros, like a simplified version of my fitness pal. I am getting started and trying to learn all the required knowledge for building such an app. What should I use if I want to allow users to create records day by day and stored according to date (Will shared preference do the trick?). I also want them to search the database (which contains columns of calories,protein,fat..etc) and add food to the counter which then sums up the total macro. Should I use a calendar view? or how else can I refresh every day and still keep the old records. Also, How should I sum the Macros if the amount of food added is a list that is custom. (e.g I cannot create two text views that are fixed and create another one to display the sum). Any intuition or method recommendation will be sufficient. Thank you so much for your time.

2 Answers

samuel zaffran
samuel zaffran
24,815 Points

Hey, it's look like you need quite a lot knowledge of android to build that kind of stuff. But i would say that the simpliest is by Firebase, but i recommand you to take the courses step by step in the order that treehouse guides you and finally you ll end up by doing pretty easily ! Hope that help !

Thank you so much for answering, I am building a basic version, so sql database will do. If I have a second activity which is a list of what i ate and calories that are entred manually every date, do I have to create a new database unique for that day to store the inputs in my second activity so It will be like a diary and I can click on the date and see what I ate on that day?

Thank you so much for answering, I am building a basic version, so sql database will do. If I have a second activity which is a list of what i ate and calories that are entred manually every date, do I have to create a new database unique for that day to store the inputs in my second activity so It will be like a diary and I can click on the date and see what I ate on that day?