SleepTracker - A sample application to track your sleep

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...
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

Catch `dd`, `ddd`, `dump`, `sleep` and `ray` functions in your code

catch-debug-code Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get familiar with the template documentation. Verify the p

SleepNow - Sleep time recommendation application
SleepNow - Sleep time recommendation application

Project: SleepNow 슬립 나우 개인 프로젝트 2020.01 ~ 2020.01 0. Overview 슬립나우는 자러 갈 시간이나 일어

Room : Sleep Quality Tracker app
Room : Sleep Quality Tracker app

Room - SleepQualityTracker app This is the toy app for Lesson 6 of the Android App Development in Kotlin course on Udacity. SleepQualityTracker The Sl

The Sleep tracker app for lesson 6 of the Udacity: Developing Android Apps with Kotlin Course
The Sleep tracker app for lesson 6 of the Udacity: Developing Android Apps with Kotlin Course

App Architecture-Presistence This is the Sleep tracker app for lesson 6 of the U

A white noise app developed with Kotlin. It helps to mediate, sleep better, focus, relax and be calm.
A white noise app developed with Kotlin. It helps to mediate, sleep better, focus, relax and be calm.

A white noise app developed with Kotlin. It helps to mediate, sleep better, focus, relax and be calm.

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

With this simple app, you can keep track of your favourite cryptocurrency on your wrist.
With this simple app, you can keep track of your favourite cryptocurrency on your wrist.

Capstone project crypto Tracker 🏁 Final Product (05-06) V1.1 "somebody toucha my spaghet" feature set State Note Track the current price of a crypto

Cryptac - Mobile application to track your favorite cryptos information. 🚀
Cryptac - Mobile application to track your favorite cryptos information. 🚀

What is it? 🤔 Cryptac is a mobile application that allows you to track the main important information about your favorite cryptos. It is currently av

Cryptac is a mobile application that allows you to track the main important information about your favorite cryptos
Cryptac is a mobile application that allows you to track the main important information about your favorite cryptos

Cryptac is a mobile application that allows you to track the main important information about your favorite cryptos.

Track your favorite crypto-currencies with daily reminders
Track your favorite crypto-currencies with daily reminders

COIN STALK Track your favourite crypto-currencies with daily reminders Screenshots Contribute Clone the repo Get your api key from Coinranking Site Cr

Money Manager app that helps you to add your daily small incomes and expenses and track them easily.
Money Manager app that helps you to add your daily small incomes and expenses and track them easily.

Simple Money Manager This app is a simple money manager app which helps you to add your daily small incomes and expenses and track them easily. Screen

An interesting workout app, that can track your progress (unfinished)
An interesting workout app, that can track your progress (unfinished)

7MinuteWorkout An interesting workout app, that can track your progress (unfinished) U planu mi je da odradim bolji dizajn za ovu aplikaciju. Za sada

Simple app to locally track your public transport trips.

ÖffiTracker Simple app to locally track your public transport trips. License Copyright 2021 Patrick Löwenstein Licensed under the Apache License, Ver

Android app that helps you keep track of the medical supplements you need to take and how you spend your days
Android app that helps you keep track of the medical supplements you need to take and how you spend your days

Android app that helps you keep track of the medical supplements you need to take and how you spend your days, similar to a bullet journal. It also allows you to reflect on your day, week, year, etc.

📲  Android Application to track any user activity on Github built using the Github Developers API. Used Retrofit to fetch data and MVVM Architecture.
📲 Android Application to track any user activity on Github built using the Github Developers API. Used Retrofit to fetch data and MVVM Architecture.

Github Visualizer 📲 Android Application to track any user activity on Github built using the Github Developers Api. A sample application to demonstra

Android Application to track Covid19.
Android Application to track Covid19.

Covid-19 Tracker A Java based app to track Covid-19. This app is made with the main motive of spreading awareness and providing statistical data relat

AppUI Sample Application - display how you can create your own custom AppUI application within a few minutes
AppUI Sample Application - display how you can create your own custom AppUI application within a few minutes

AppUI Sample Application This is an open-source project to display how you can create your own custom AppUI application within a few minutes. I have a

ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture.
ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture.

ATH Sample ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture. Overview ATH Sample is a sa

Owner
null
Medium sample for frogo-recycler-view

mediumstory-frogo-recycler-view Tutorial how to use frogo-recycler-view lib Medium sample for frogo-recycler-view Medium Story Here frogo-recycler-vie

Muhammad Faisal Amir 5 Sep 12, 2021
Reproducible sample with Fix for Memory Leak in RecyclerView Adapter

Memory Leak RecyclerView Adapter Reproducible Sample with Fix Video Instructions: https://www.youtube.com/c/awesomedevnotes Code Only the relevant and

Awesome Dev Notes | Android Dev Notes YouTube 7 Jun 7, 2022
Dividers is a simple Android library to create easy separators for your RecyclerViews

Dividers Dividers is an Android library to easily create separators for your RecyclerViews. It supports a wide range of dividers from simple ones, tha

Karumi 490 Dec 28, 2022
A RecyclerView Adapter which allows you to have an Infinite scrolling list in your apps

Infinite Recycler View A RecyclerView Adapter which allows you to have an Infinite scrolling list in your apps. This library offers you a custom adapt

IB Sikiru 26 Dec 10, 2019
Beautify your RecyclerViews with a great parallax effect !

BeautifulParallax Beautify your RecyclerViews with a great parallax effect ! Without Carpaccio public class YOURAdapter extends RecyclerView.Adapter<Y

Florent CHAMPIGNY 413 Nov 2, 2022
Organize your images in beautiful collage with this library!

CollageImageView This app is an example. how to create collages with RecyclerView. See an example, how it's working: device-2021-04-24-015545.mp4 Inst

Sergey Grishin 16 Oct 14, 2022
RecyclerView with DiffUtil is a way to improve the performance of your app

RecylerViewSamples RecyclerView with DiffUtil is a way to improve the performanc

Chhote Lal Pal 0 Dec 20, 2021
A Shopping List application developed in Kotlin

SparMePlease Wanna buy stuff from Spar? Well, make a list ... Overview This is a pretty little android application written in Kotlin which will help y

Wali Ullah 5 May 22, 2022
RecyclerView Application example using kotlin and viewbinding.

SimpleRecyclerViewApp Shows how to display some items in a simple list using the RecyclerView and RecycleView.Adapter. The RecycleView is the entity t

Google Developers 2 Mar 28, 2022
Vaibhav Jaiswal 57 Jan 3, 2023