Kotlin Coroutines

If you have not used Kotlin Coroutines yet, it is high time to start using them. They are one of the best ways to make asynchronous tasks. Since Google announced Kotlin First, it has become natural to use Coroutines. They are not just a simple tool for creating sync tasks, they also have advanced features like:

  • Flows
  • Continuations

Coroutines vs RxJava2

It is not an article about differences so I do not want to go into deep details. The main difference is that RxJava2 is a really powerful tool not only for async tasks. If you ask me what solution you should use, the answer is simple, it depends on your requirements, so I suggest you read more about these tools and make a deliberate decision.

Themes

Jetpack Security

Navigation Component

ViewPager 2

View Pager and Recycler View. This sounds great, but it was not possible before. Now with View Pager 2, it is possible.

  • support for vertical orientation
  • new PageChangeCallback — no need to override all 3 methods
  • added different Page Transformers

Saved State

This is a library which helps us to save instance state. Why is it even needed if ViewModel can survive configuration changes? A configuration change is not the only case. Android Developers should be aware of system-initiated process death as well. For this, we should save the state serialized in disk space and now we have this built-in ViewModel.

Jetpack Compose

Summary

In 2019 there were a few news in the Android world. Obviously the biggest is Jetpack Compose, but it can take a long time to make it stable. It may not even happen in 2020, but for sure it is worth learning and it is a future of building views in Android.

Senior Android Developer @ Espeo Software. Kotlin lover. Tech stack: MVVM, Dagger2, Coroutines, RxJava2, Android Architecture Components

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store