Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Mastering Kotlin for Android 14
  • Toc
  • feedback
Mastering Kotlin for Android 14

Mastering Kotlin for Android 14

By : Wangereka
5 (9)
close
Mastering Kotlin for Android 14

Mastering Kotlin for Android 14

5 (9)
By: Wangereka

Overview of this book

Written with the best practices, this book will help you master Kotlin and use its powerful language features, libraries, tools, and APIs to elevate your Android apps. As you progress, you'll use Jetpack Compose and Material Design 3 to build UIs for your app, explore how to architect and improve your app architecture, and use Jetpack Libraries like Room and DataStore to persist your data locally. Using a step-by-step approach, this book will teach you how to debug issues in your app, detect leaks, inspect network calls fired by your app, and inspect your Room database. You'll also add tests to your apps to detect and address code smells. Toward the end, you’ll learn how to publish apps to the Google Play Store and see how to automate the process of deploying consecutive releases using GitHub actions, as well as learn how to distribute test builds to Firebase App Distribution. Additionally, the book covers tips on how to increase user engagement. By the end of this Kotlin book, you’ll be able to develop market-ready apps, add tests to their codebase, address issues, and get them in front of the right audience.
Table of Contents (22 chapters)
close
1
Part 1: Building Your App
6
Part 2: Using Advanced Features
12
Part 3: Code Analysis and Tests
16
Part 4: Publishing Your App

Kotlin features for Android developers

Now that you have had an introduction to Kotlin, let’s look at why Kotlin is a great language specifically for Android development.

Google announced Kotlin as a first-class language for writing Android apps back in 2017. Since then, there has been lots of work done to make sure that developers have all they need to develop Android apps in Kotlin. Here are some of the features that developers can benefit from:

  • Improved developer productivity: Kotlin’s concise and expressive syntax can help developers write code faster and with fewer errors, which can ultimately improve developer productivity.
  • Null safety: Since Kotlin is written with nullability in mind, it helps us to avoid crashes related to the Null Pointer Exception.
  • IDE support: IDE support has been continuously improving. Android Studio, which is built on top of IntelliJ IDEA, has been receiving tons of features such as improved autocompletion support to improve the Kotlin experience.
  • Jetpack libraries: Jetpack libraries are available in Kotlin, and older ones are being rewritten with Kotlin. These are a set of libraries and tools to help Android developers write less code. They address common developer pain points and increase developer efficiency.
  • Jetpack Compose: Jetpack Compose, a new UI framework, is completely written in Kotlin and takes advantage of features of the Kotlin language. It’s a declarative UI framework that makes it easy for Android developers to build beautiful UIs for their apps.
  • Kotlin Gradle DSL: You are now able to write your Gradle files in Kotlin.
  • Coroutine support: A lot of Jetpack Libraries support coroutines. For example, the ViewModel class has viewModelScope that you can use to scope coroutines in the lifecycle of the ViewModel. This aligns with the Structured Concurrency principles for coroutines. This helps cancel all coroutines when they’re no longer needed. Some libraries including Room, Paging 3, and DataStore also support Kotlin coroutines.
  • Support from Google: Google continues to invest in Kotlin. Currently, there are resources ranging from articles to code labs, documentation, videos, and tutorials from the Android DevRel team at Google to assist you in learning new libraries and architecture for Android Development.
  • Active community and tooling: Kotlin has a vibrant and active community of developers, which means that there are plenty of unofficial resources, libraries, and tools available to help with Android development.
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete