72 Topics

Member Avatar for
Member Avatar for dimitrilc

## Introduction ## WorkManager is the preferred method of managing background tasks on Android. It also includes convenient extensions for RxJava3 and Kotlin Coroutines. In this tutorial, we will learn how to use WorkManager as well as how to observe the background task with the debugging tool Background Task Inspector. …

1
92
Member Avatar for dimitrilc

## Introduction ## Coil is a popular image loading library for Kotlin-first Android projects. It is lightweight, fast and is super easy to use. In this tutorial, we will learn how to use Coil to load images into our project. ## Goals ## At the end of the tutorial, you …

3
923
Member Avatar for dimitrilc

## Introduction ## In this tutorial, we will learn how to capture a picture with the new **ActivityResult** APIs(`androidx.activity.result`), which replace the `startActivityForResult()` and `onActivityResult()` APIs(*from Activity class*). Additionally, we will also learn about the ContentProvider **FileProvider**, which we will have to set up to save our images. ## Goal …

3
5K
Member Avatar for dimitrilc

## Introduction ## Navigation component is an abstraction on top of FragmentManager, which simplifies navigation between fragments. In this tutorial, we will learn how to use the Navigation component in our App. ## Goal ## At the end of the tutorial, you would have learned: 1. How to use the …

3
167
Member Avatar for dimitrilc

## Introduction ## Regardless of whether you like notches on your devices or not, they exist, so as developers, we will have to adapt our Apps to work with them. In this tutorial, we will learn how to adapt our code to work with notches. The device used in this …

0
287
Member Avatar for dimitrilc

## Introduction ## If your Android app is available to a global audience, you might have wondered how to load localized **String**s into your app. This tutorial will teach you how to do just that. There are quite a few steps involved, but once you understand the concepts, it will …

2
166
Member Avatar for dimitrilc

## Introduction ## If you are a Java developer coming to Kotlin, you might have wondered how to use a language construct that is similar to the try-with-resource statement in Java to automatically close Autocloseable/Closeable resources for you. Luckily, Kotlin provides the inline extension function `use()` that provides similar functionality …

2
318
Member Avatar for dimitrilc

## Introduction ## In Kotlin, we can extend classes without subclassing via extension functions and extension properties. This feature is useful whenever we want to extend 3rd party libraries or final classes. In this tutorial, we will learn what extension functions and extension properties are, and how to create our …

2
236
Member Avatar for dimitrilc

## Introduction ## `launch()` and `async()` are two of the most common coroutine builders to use in Kotlin, but they are somewhat different in usage. `launch()` returns a `Job` object, which can be used to cancel or perform other operations on the underlying coroutine. If our coroutine lambda returned a …

3
283
Member Avatar for dimitrilc

## Introduction ## With coroutines in Kotlin, we are able to execute suspending functions without blocking the current thread. By default, most coroutine builder functions use the `Dispatchers.Default` context, but it is also possible to use other implementations of `CoroutineContext`. In this tutorial, we will learn about the 2 `CoroutineDispatchers`: …

3
135
Member Avatar for dimitrilc

## Introduction ## In Android development, the current recommended library for Dependency Injection is Hilt. The most obvious benefits of using Hilt are reduced boilerplate code and lifecycle-aware components(*and their associated annotations*). Hilt is a great library, but it is not perfect. Hilt is built on top of Dagger 2, …

2
1K
Member Avatar for dimitrilc

## Introduction ## This tutorial teaches you how to implement the Type-safe Builder pattern using Kotlin. This pattern allows developers to create declarative and concise DSLs. Our implementation will be a Burger Builder that enables our users to create Burger objects expressively. ## Goals ## At the end of the …

2
411

The End.