Entering 2020, Android ecosystem has also undergone a lot of changes, from the perspective of an experienced Android developer analysis of Android development status quo, do not like to spray.

Kotlin


Kotlin has become the official Language for Android development, with new Documentation and Sample code for Android moving to Kotlin, accelerating the replacement of Java with Kotlin in the future.

KTX

KTX is the glue that makes Kotlin and Android seamless, the catalyst that allows Kotlin and Android to chemically react. There will be more support for Android in the future, including Coroutine.

Jetpack

The point of Jetpack is that it gives us a set of middleware tools on top of the SDK, so that we can get out of the rut of trying to copy a wheel. A similar solution looks at Jetpack first and third party implementations second, fine.

Archive Jetpack itself continues to incorporate excellent third party solutions. So keep an eye on Jetpack as a developer.

Fragment

Fragments have become more important and improved since Android introduced SAA (Single Activity Application) mode, FragmentFactory, FragmentContainerView, and many more have been added. According to the introduction of Android Submit, the complex life cycle of Fragment, which has been criticized, will be optimized in the near future (Fragment will scrap onActivityCreated), so if possible, we hope that people use more Fragment and less Activity.

Security

Security is a neglected requirement, but it will become increasingly important in the future. Security is an encryption library provided by Jetpack that can be used in data reading and writing scenarios such as SharedPreferences. In the past, such requirements are often implemented by developers themselves, but now the official provides a unified solution, which is worth trying.

MinSdk currently supports 23, and there may be a downward compatible 21 in the future

Paging

Paging needs no further introduction and is now the mainstream solution in the list page. 3.0 seems to have been completely rewritten with Kotlin, with a full shift to Coroutine that will bring a whole new experience to developers.

Android Code Search

AOSP and Jetpack source code retrieval tools provided by the official, not only a simple display of the code, the left side can also browse the file directory and file outline, you can also view git submission history.


However, it is not the local code after all, and the server is outside the country, so the access experience is not very smooth. It is better to use this online tool for simple and wide browsing, and clone it to the local area for module intensive reading

DI

While Kotlin has Koin and others, Google still recommends Dagger as the preferred Dagger in Android, and various AAC demos are rife with Dagger usage. Although Dagger has a slightly higher learning threshold than other similar frameworks, it is indeed profitable in large projects in the long run. In the future, the Dagger Android will be further optimized in terms of ease of use, which is recommended as the first choice for DI

Coroutines

Personally, I think Coroutine has been slow to get off the ground so far, probably because Android lacks the asynchronous communication of the Promise model on the front end (Future is not used much on Android either), so developers lack the mental foundation to understand coroutines. Plus frameworks like RxJava are just too good. However, with the launch of Flow and Jetpack’s continuous support for Coroutine, I remain optimistic about its future. Students who have not been in contact with Coroutine had better get familiar with it

Kotlin multiplatform project

There are a lot of discussions about MPP in KotlinConf 2019, and Kotlin1.4 has put the most upgrades on MPP. I feel that AS the key to Kotlin’s future competitiveness, MPP is bound to get the attention of Jetbrins and even Google. It has great potential and deserves attention in the future.

Jetpack Compose

The new declarative UI framework released by Google I/O 2019. Although it is still in pre-alpha, the download experience is not perfect at present, but the new design idea is definitely a trend, which has been verified in the application of React and Flutter. SwiftUI launched at the same time in ios development also proves the consensus of the industry on this trend of declarative UI development. It is said that there will be an unspecified beta in 2020, so hopefully you will try it out soon and it will replace the way you develop your UI in the near future.

Android Studio

Android Studio 4.0 adds many new features, such as Compose support and 3D Views, to make it very convenient. In addition, Desugaring for D8/R8 helps us use Java8 on lower versions of the OS

minSdkVersion

Personally, I think minSdkVersion should start from 23. Models below 23 can be annotated and abandoned in APP development

conclusion

The iteration of new Android technologies has accelerated significantly in recent years, due to a variety of reasons, including the challenge of new cross-platform species from outside, business considerations for de-Java-ization, and the acceleration of official homegrown platforms like Jetpack. As Android developers, we need to keep an eye on things but not blindly follow them. We need to be aware of the trends, and we need to make sure we don’t waste time on new technologies that are just a flash in the pan.