Java HarmonyOS API for Android Developers — Cheatsheet

Bruno Wieczorek
Huawei Developers
Published in
1 min readOct 15, 2021

The HarmonyOS SDK allows you to create an application’s UI in JS and Java. The Java SDK is based on the Android SDK but it differs in multiple places, e.g. in component names. Being an experienced Android developer, you may feel lost among the new API names and subtly changed behaviours. That’s why I decided to list the corresponding components of SDK for Android and HarmonyOS Java in one place. This will allow you to use your Android knowledge while programming your HarmonyOS application.

Examples are presented in the form of a cheatsheet as thematically divided comparison tables for different parts of the ecosystem.

The following code is available as a repository: https://github.com/burnoo/HarmonyOSAndroidCheatsheet. You can report Issues and PRs with missing elements or suggestions there.

As you can see in the tables, programming for both platforms is very similar. Using the search option (ctrl+f or cmd+f) you can find familiar elements from Android and the corresponding HarmonyOS SDK components. I hope this cheatsheet will help you with the development.

--

--