Giter Site home page Giter Site logo

android-kotlin-fundamentals-lesson-06's Introduction

Android Kotlin Fundamentals Course 6: Room database and Coroutines - TrackMySleepQuality

A project result of Android Kotlin Fundamentals Codelab 6: Room database & Coroutines which the starter code deployed from TrackMySleepQuality-Starter within GitHub repository google-developer-training/android-kotlin-fundamentals-starter-apps

Lesson Summary

Lesson 6 teaches you how to use the Room database library. Room takes care of many of the chores of setting up and configuring a database, and simplifies the code for interacting with the database. You learn how to use Kotlin coroutines to move database operations away from the main thread, and you learn more about using ViewModel and LiveData with app navigation.

Introduction

TrackMySleepQuality is an app for recording sleep data for each night. You can record a start and stop time, assign a quality rating, and clear the database.

In this codelab, working from this starter app, you will implement the Room database that holds the sleep data. You will then use instrumented tests to verify that this backend works.

Pre-requisites

You need to know:

  • Building a basic user interface (UI) for an Android app, using an activity, fragments, and views.
  • Navigating between fragments and using Safe Args (a Gradle plugin) to pass data between fragments.
  • View models, view-model factories, and LiveData and its observers. These Architecture Components topics are covered in an earlier codelab in this course.
  • A basic understanding of SQL databases and the SQLite language.

Getting Started

  1. Download and run the app.

License

Copyright 2019 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

android-kotlin-fundamentals-lesson-06's People

Contributors

akmalrusli363 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.