Room - SleepQualityTracker app

Overview

Room - SleepQualityTracker app

This is the toy app for Lesson 6 of the Android App Development in Kotlin course on Udacity.

SleepQualityTracker

The SleepQualityTracker app is a demo app that helps you collect information about your sleep.

  • Start time
  • End time
  • Quality
  • Time slept

This app demonstrates the following views and techniques:

  • Room database
  • DAO
  • Coroutines

It also uses and builds on the following techniques from previous lessons:

  • Transformation map
  • Data Binding in XML files
  • ViewModel Factory
  • Using Backing Properties to protect MutableLiveData
  • Observable state LiveData variables to trigger navigation

Screenshots

Screenshot1 Screenshot2 Screenshot3

How to use this repo while taking the course

Each code repository in this class has a chain of commits that looks like this:

listofcommits

These commits show every step you'll take to create the app. Each commit contains instructions for completing the that step.

Each commit also has a branch associated with it of the same name as the commit message, as seen below:

branches Access all branches from this tab.

listofbranches

branchesdropdown

The branches are also accessible from the drop-down in the "Code" tab.

Working with the Course Code

Here are the basic steps for working with and completing exercises in the repo.

The basic steps are:

  1. Clone the repo.
  2. Check out the branch corresponding to the step you want to attempt.
  3. Find and complete the TODOs.
  4. Optionally commit your code changes.
  5. Compare your code with the solution.
  6. Repeat steps 2-5 until you've gone trough all the steps to complete the toy app.

Step 1: Clone the repo

As you go through the course, you'll be instructed to clone the different exercise repositories, so you don't need to set these up now. You can clone a repository from github in a folder of your choice with the command:

git clone https://github.com/udacity/REPOSITORY_NAME.git

Step 2: Check out the step branch

As you go through different steps in the code, you'll be told which step you're on, as well as a link to the corresponding branch.

You'll want to check out the branch associated with that step. The command to check out a branch would be:

git checkout BRANCH_NAME

Step 3: Find and complete the TODOs

Once you've checked out the branch, you'll have the code in the exact state you need. You'll even have TODOs, which are special comments that tell you all the steps you need to complete the exercise. You can easily navigate to all the TODOs using Android Studio's TODO tool. To open the TODO tool, click the button at the bottom of the screen that says TODO. This will display a list of all comments with TODO in the project.

We've numbered the TODO steps so you can do them in order: todos

Step 4: Commit your code changes

After You've completed the TODOs, you can optionally commit your changes. This will allow you to see the code you wrote whenever you return to the branch. The following git code will add and save all your changes.

git add .
git commit -m "Your commit message"

Step 5: Compare with the solution

Most exercises will have a list of steps for you to check off in the classroom. Once you've checked these off, you'll see a pop up window with a link to the solution code. Note the Diff link:

solutionwindow

The Diff link will take you to a Github diff as seen below: diff

All of the code that was added in the solution is in green, and the removed code (which will usually be the TODO comments) is in red.

You can also compare your code locally with the branch of the following step.

Report Issues

Notice any issues with a repository? Please file a github issue in the repository.

You might also like...
An app to manage posts such as create, update, show the post list and detail also delete the post.

Otopost An app to manage posts such as create, update, show the post list and detail also delete the post. Minimum Requirements Software Android Studi

The source code for the Bus Scheduler app codelab

Bus Scheduler App This folder contains the source code for the Bus Scheduler app codelab. Introduction The Bus Scheduler app displays a list of bus st

MVI Architecture Android Beginners: Sample App

MVI Architecture Android Beginners: Sample App This repository contains a sample app that implements MVI architecture using Kotlin, ViewModel, LiveDat

Event Trackr Android app. Allows users to track birthdays and anniversaries of friends and family.
Event Trackr Android app. Allows users to track birthdays and anniversaries of friends and family.

Trackr Event Trackr Android app. Allows users to track birthdays and anniversaries of friends and family. You need to open this project in Android Stu

A sample app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach
A sample app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach

A sample app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach

A sample photo browsing app in Kotlin, Android using Picsum image API.
A sample photo browsing app in Kotlin, Android using Picsum image API.

Picsum Photo App Functionality The app's functionality includes: Fetch a list of images from picsum photos api (https://picsum.photos/) and show them

Taken from a PeopleCode app package to be used as a refactoring exercise

The code below was taken from a PeopleCode app package to be used as a refactoring exercise. Packages original: contains the code below translated int

Base App - MVVM, Base Structure, Hilt, Kotlin Flow, Retrofit
Base App - MVVM, Base Structure, Hilt, Kotlin Flow, Retrofit

Base App - MVVM, Base Structure, Hilt, Kotlin Flow, Retrofit

TrackerApp - Room - SleepQualityTracker app With Kotlin
TrackerApp - Room - SleepQualityTracker app With Kotlin

Room - SleepQualityTracker app This is the toy app for Lesson 6 of the Android A

The SleepQualityTracker app - a demo app that helps you collect information about your sleep
The SleepQualityTracker app - a demo app that helps you collect information about your sleep

The SleepQualityTracker app is a demo app that helps you collect information about your sleep. This app builds on the SleepQualityTracker previous made, refactoring the code to make it more efficient so it will be easier to maintain and test

RecyclerView : SleepQualityTracker with RecyclerView app
RecyclerView : SleepQualityTracker with RecyclerView app

RecyclerView - SleepQualityTracker with RecyclerView app SleepQualityTracker with RecyclerView This app builds on the SleepQualityTracker developed pr

UserListCheck - Retrofit, Room, Hilt MVVM project. Get JSON from reqres.in by Retrofit, fill data into created Room database, show in RecycleView list Minimum-mvvm-room-database - MVVM With Simple Room Database
Minimum-mvvm-room-database - MVVM With Simple Room Database

Minimum MVVM Koin (Kotlin Dependency Injection) Coroutines View Model Lifecycle

ToDo-Task-App - An Android App built to demonstrate the use of Jetpack Compose, Material You, Room Database, and MVVM

ToDo Task App ToDo Task App is a sample Android app built with Jetpack Compose.

Accounting-App - An Android app built with Kotlin, Material, Jetpack Compose, Hilt, Room, Coroutines, Data-Store, MVVM-Clean Architecture and JUnit tests A sample app that shows how to easily encrypt the room database in an Android app
A sample app that shows how to easily encrypt the room database in an Android app

A sample app that shows how to easily encrypt the room database in an Android app. The password used for encryption is generated on the first use and saved in the Android EncryptedSharedPreferences.

A quiz app built with trivia api. This app was built with mvvm architecture, dagger-hilt, retrofit, room database, and navigation components.
A quiz app built with trivia api. This app was built with mvvm architecture, dagger-hilt, retrofit, room database, and navigation components.

A quiz app built with trivia api. This app was built with mvvm architecture, dagger-hilt, retrofit, room database, and navigation components.

A simple notes app to demo Room + LiveData implementation in Android
A simple notes app to demo Room + LiveData implementation in Android

RoomDb-Sample This is a demo app on how to implement Room persistance library, making use of LiveData in Android app How to implement Room: a SQLite o

Android To-Do MVVM Architecture App written in Kotlin.(ViewModel, ROOM, Livedata, Coroutines)

MVVM-To-Do-App A To-Do application written in kotlin using Android Architectural components What's new? Room + Coroutines - Upgraded Room to v2.1. Roo

Owner
null
This application features - Modern Minimalistic Design, MVVM, Pagination, Hilt, Retrofit, Room, Data Store, Flow, Live Data, Navigation Component (Clean Architecture)

NewsFly NewsFly is a modern news android application which features virtually ALL recent and recommended android development tech stack and tools used

Ibrahim 121 Nov 4, 2022
ROOM Database Example with MVVM in Kotlin[Fragments,Navigation]

RoomDatabase_SampleApp Room Database Sample App Overview Of This Room Database Application In this app, we can do operation on room database | Insert,

RUHUL AMIN CHOUDHURY 0 Nov 3, 2021
REST API with Retrofit, SQLite with Room, Hilt, MVVM, Jetpack Compose

Simple REST API Learn how to make an Android App that will call a REST API using Retrofit to retrieve some data that will be stored in SQLite using Ro

Yayo Arellano 26 Dec 23, 2022
Learn to work with databases on Android using the Room persistence library.

Bus Scheduler App This folder contains the source code for the Bus Scheduler app codelab. Introduction The Bus Scheduler app displays a list of bus st

Google Developer Training 71 Dec 21, 2022
Small project on using Room + MVVM + data binding

healthinfo This is a demo project that utilizes Room Database, MVVM, Data binding, Repositories, Retrofit and more to build an app that reads content

Mohammad Ali Fouani 0 Nov 24, 2021
This is the toy app for Lesson 9 of the Android App Development in Kotlin course on Udacity.

Behind the Scenes - DevByte Viewer App This is the toy app for Lesson 9 of the Android App Development in Kotlin course on Udacity. DevByte DevByte Vi

Jaime 1 Oct 20, 2021
The simple app is to demonstrate how the modern Enterprise Android App Architecture should be

Weather Forecast App The simple app is to demonstrate how the modern Enterprise Android App Architecture should be. Clean Architecture (Mr Uncle Bob)

null 2 Nov 12, 2021
eCommerce app developed with Android Jetpack and Kotlin

garden-shed eCommerce app developed with Android Jetpack and Kotlin This is my first mobile application. Garden Shed is a simple application for buyin

null 2 Nov 1, 2022
The code for the Congression App Challenge Webinar.

Getting-Started-with-Android-Studio-and-Kotlin-CAC-Webinar A webinar hosted by the Congressional App Challenge and theCoderSchool The code for the Con

null 1 Oct 18, 2021
LoadApp This is my submission for the "Building an Advanced Android App"

LoadApp This is my submission for the "Building an Advanced Android App" project of the Udacity Android Kotlin Developer nanodegree. (C) Jaldhar H. Vy

Jaldhar H. Vyas 1 Oct 7, 2021