The tracker resets everyday, history is saved on a Room database (onboard). A user can manually add or search the API for food entries. The details from an API entry are also saved and requestable in the app.
These instruction will allow you to run a copy of the project on your local machine for development and testing
Android Studio
Clone the repository
git clone [email protected]:robbedec/calorietracker-android.git
Open the project in Android Studio and build
Register a developer account (free) on the Nutritionix website and generate your api keys.
Create keys.xml in res/values/. The contents of the file should look like this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="x_app_id">yourAppId</string>
<string name="x_app_key">yourAppKey</string>
</resources>
Run the following commands in the terminal or run the designated gradle tasks in Android Studio.
To run unit tests:
./gradlew test
To run instrumented unit tests (i.e. ui tests):
./gradlew connectedAndroidTest
Generate documentation by executing the following command in the root of the project or run the dokka gradle task in Android Studio.
./gradlew dokka
This will generate the docs/ folder in the root of the project. This folder contains the dokka generated Markdown (in github-flavored-markdown).
- Gradle - Dependency Management
- Koin - Dependency Injection
- Room - Persistence library for onboard database
- Timber - Logging tool
- Retrofit - Http client
- Moshi - JSON parser
- Nutritionix - public API and food database
- Robbe Decorte
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details