New Course: Saving Data on Android

Learn various ways to persist data in your app: SharedPreferences, saving data to files, using SQLite, and using the Room library from Google. By Joe Howard.

Leave a rating/review
Save for later
Share
You are currently viewing page 2 of 2 of this article. Click here to view the first page.

Part 4: Room

In the final part, use the new Room library, part of the Android Architecture Components, to save data.

Introduction: Learn about the Architecture Components from Google, including LiveData, ViewModel, and the data peristence library Room that provides a layer above SQLite.

Architecture: Review a new architecture of the DataDrop app that uses Model-View-ViewModel (MVVM) instead of MVP, as preparation for working with LiveData and Room.

Entities and DAOs: Learn about the use of Entities and Data-Access-Objects (DAOs), and see how to set them both up using annotations.

Room Database: See how to create a Room database and how to read from and write data into Room. See also how to use TypeConverters and observe changes to LiveData.

Challenge: Room Database: Practice what you’ve learned about Room by finishing the RoomRepository to handle the delete use cases.

Relationships: See how to setup relationships in a Room database. Also see how to pre-populate Room data using a RoomDatabase.Callback.

Conclusion: In this final episode, we’ll summarize this final part and the whole course, and then see an overview of data persistence topics that were not covered.

  1. Introduction: Learn about the Architecture Components from Google, including LiveData, ViewModel, and the data peristence library Room that provides a layer above SQLite.

  2. Architecture: Review a new architecture of the DataDrop app that uses Model-View-ViewModel (MVVM) instead of MVP, as preparation for working with LiveData and Room.

  3. Entities and DAOs: Learn about the use of Entities and Data-Access-Objects (DAOs), and see how to set them both up using annotations.

  4. Room Database: See how to create a Room database and how to read from and write data into Room. See also how to use TypeConverters and observe changes to LiveData.

  5. Challenge: Room Database: Practice what you’ve learned about Room by finishing the RoomRepository to handle the delete use cases.

  6. Relationships: See how to setup relationships in a Room database. Also see how to pre-populate Room data using a RoomDatabase.Callback.

  7. Conclusion: In this final episode, we’ll summarize this final part and the whole course, and then see an overview of data persistence topics that were not covered.

The Android Avalanche Bundle

If you like this course, from now until March 30th you can get it along with the rest of our new Android and Kotlin books, courses, and screencasts — at a big discount!

Our new Android Avalanche Bundle includes:

  • Android Apprentice ($54.99 value): Gives you access to our new Android Apprentice book, which teaches you how to build four complete Android apps from scratch. PDF/ePub format.
  • Kotlin Apprentice ($54.99 value): Gives you access to our new Kotlin Apprentice book, which gives you a deep dive into the Kotlin programming language itself. PDF/ePub format.
  • A raywenderlich.com subscription ($19.99 value): Gives you access to all 8 of our new Android video courses, our 2 new Android screencasts, and access to any new courses and screencasts we release in the future.

The bundle price of $99.99 includes the first month of your subscription, which will continue at $19.99/month thereafter. You can cancel at any time and keep the books. This bundle gives you more than 20% off everything in the Android Avalanche!

The Android Avalanche bundle is only available for the next two weeks, so be sure to order your copy while you can.

Already a subscriber? As a subscriber, you already have access to this new course as part of your subscription. You can also enjoy a $20 discount on the bundle that will get you both books added to your collection. It’s our way of thanking you for supporting what we do here at raywenderlich.com.

Where To Go From Here?

If you want to learn Android and Kotlin development — or level up your existing skills – there’s no better way to learn than these new books, courses, and screencasts.

And this is only the beginning! We’re committed to creating more new books, courses, and screencasts on Android development, with the goal of covering Android and Kotlin in the same way that we’ve covered iOS and Swift over the years.

We truly appreciate your support in making this possible. We’re excited about this new chapter at raywenderlich.com. So order your copy of the Android Avalanche Bundle today before the deal is over!

Contributors

Over 300 content creators. Join our team.