App developers are constantly working on new methods to simplify and shorten the development process on one hand and build the best designs and user experience on the other. Each year we can see the continuing emergence of new, cutting-edge techniques and tools in mobile apps development. Here we present the trends that will give you a better insight into what should be on top in year 2020.
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:
There are also useful extensions for ViewModel and LiveData:
It is not an article about differences so we 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 us what solution you should use, the answer is simple, it depends on your requirements, so we suggest you read more about these tools and make a deliberate decision.
Since Android 10, Google officially has supported a dark theme. It means we can rely on system settings, and adjust our app to system theme. Multiple themes support have already been added to many apps like Instagram, Chrome or just Medium. You can use also new Material Components Styles in version 1.1.0 to support the dark theme functionality in Android Q. Unfortunately this is still in beta. More information here.
Google has put a really big effort to improve security on Android devices for the last years. Not every app needs really advanced solutions, but what we would like to highlight is the new security library from Google.
Jetpack Security is a way to store data more securely in Shared Preferences. The most important thing is that the library uses Android Keystore System. It has been announced lately and is in alpha version. Check it out here.
Google introduced Navigation Component at Google IO in 2018 and it took almost a year to prepare a stable version, which was released in March 2019.
It is a completely new approach for designing a navigation graph for Android apps. This solution is similar to that from iOS which is called Story Boards. We implement a navigation graph in Navigation Editor or just editing XML files. Navigation Component supports things like fragment transactions, deep links, SafeArgs and even view model scopes.
More about Navigation Component here.
View Pager and Recycler View. This sounds great, but it was not possible before. Now with View Pager 2, it is possible.
Moreover, since the 20 of November 2019, View Pager 2, has been released in a stable version.
View Pager 2 brings us a lot of improvements:
If you want to find out more about View Pager 2, check this article.
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.
The stable version has been available since September 2019, but there is also extension library ViewModel-SavedState in RC-03 version.
Last but not least, Jetpack Compose. To be honest, We have really high hopes for this. It is a totally new way of creating views in Android. We can even say finally we have something like that. This solution is a reactive way to create UI and it is entirely written in Kotlin!
If you want to try Jetpack Compose, check out this tutorial.
Unfortunately, Jetpack Compose is not even in the alpha version, it is in Developer Preview.
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.