Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
How to Build Android Applications with Kotlin

You're reading from   How to Build Android Applications with Kotlin A hands-on guide to developing, testing, and publishing production-grade Android 16 apps

Arrow left icon
Product type Paperback
Published in Sep 2025
Publisher Packt
ISBN-13 9781835882764
Length 654 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Alex Forrester Alex Forrester
Author Profile Icon Alex Forrester
Alex Forrester
Eran Boudjnah Eran Boudjnah
Author Profile Icon Eran Boudjnah
Eran Boudjnah
Alexandru Dumbravan Alexandru Dumbravan
Author Profile Icon Alexandru Dumbravan
Alexandru Dumbravan
Jomar Tigcal Jomar Tigcal
Author Profile Icon Jomar Tigcal
Jomar Tigcal
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Android Foundation
2. Creating Your First App FREE CHAPTER 3. Building User Screen Flows 4. Developing the UI with Jetpack Compose 5. Building App Navigation 6. App Components
7. Essential Libraries – Ktor, Kotlin Serialization, and Coil 8. Building Lists with Jetpack Compose 9. Android Permissions and Google Maps 10. Services, WorkManager, and Notifications 11. Code Structure
12. Testing with JUnit, Mockito, MockK, and Compose 13. Coroutines and Flow 14. Android Architecture Components 15. Persisting Data 16. Dependency Injection with Dagger, Hilt, and Koin 17. Polishing and Publishing an App
18. Architecture Patterns 19. Advanced Jetpack Compose 20. Launching Your App on Google Play 21. Unlock Your Book’s Exclusive Benefits 22. Other Books You May Enjoy 23. Index

Using Coroutines on Android

Coroutines is a Kotlin library you can use to manage background tasks, such as making network calls and accessing files or databases. Kotlin Coroutines simplifies your asynchronous programming in Android by allowing you to code sequentially the tasks that will be run in a suspending function and then resume afterward. Google has updated its libraries to support Coroutines, and most third-party libraries have added support too.

You can use Coroutines in your Android project by including the latest version of org.jetbrains.kotlinx: kotlinx-coroutines-core (the core library for Coroutines) and org.jetbrains.kotlinx: kotlinx-coroutines-android (the library that adds support for Android’s main thread) in your version catalog file and add it to your app module’s build.gradle file’s dependencies block.

If you want to make a function a suspending function, add the suspend keyword to it. Let’s say you have the following function...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
How to Build Android Applications with Kotlin
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
Modal Close icon
Modal Close icon