Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Thriving in Android Development Using Kotlin

You're reading from   Thriving in Android Development Using Kotlin A project-based guide to using the latest Android features for developing production-grade apps

Arrow left icon
Product type Paperback
Published in Jul 2024
Publisher Packt
ISBN-13 9781837631292
Length 410 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Gema Socorro Rodríguez Gema Socorro Rodríguez
Author Profile Icon Gema Socorro Rodríguez
Gema Socorro Rodríguez
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Part 1:Creating WhatsPackt, a Messaging App FREE CHAPTER
2. Chapter 1: Building the UI for Your Messaging App 3. Chapter 2: Setting Up WhatsPackt’s Messaging Abilities 4. Chapter 3: Backing Up Your WhatsPackt Messages 5. Part 2:Creating Packtagram, a Photo Media App
6. Chapter 4: Building the Packtagram UI 7. Chapter 5: Creating a Photo Editor Using CameraX 8. Chapter 6: Adding Video and Editing Functionality to Packtagram 9. Part 3:Creating Packtflix, a Video Media App
10. Chapter 7: Starting a Video Streaming App and Adding Authentication 11. Chapter 8: Adding Media Playback to Packtflix with ExoPlayer 12. Chapter 9: Extending Video Playback in Your Packtflix App 13. Index 14. Other Books You May Enjoy

Implementing Room in WhatsPackt

In this section, you will be guided through the practical steps of implementing Room in our chat application. We will begin by setting up Room in Android Studio, followed by creating entities and DAOs and eventually using these components to interact with our database.

Adding dependencies

To start using Room, we first need to include the necessary dependencies in our project. Open your build.gradle file and add the following dependencies under dependencies:

dependencies {
    implementation "androidx.room:room-runtime:2.3.0"
    kapt "androidx.room:room-compiler:2.3.0"
    implementation "androidx.room:room-ktx:2.3.0"
    // optional - Test helpers
    testImplementation "androidx.room:room-testing:2.3.0"
}

The room-runtime dependency includes the core Room library, while the room-compiler dependency is...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime