Home / Android

Correspondence between Huawei HarmonyOS and Android Version

Posted on:2023-04-17 Views:2007 Words:277

Before developing a Bluetooth intercom app running on a Huawei tablet, I did not test the tablet device at first, but I tested it on a mobile phone based on Xiaomi Android 12.

After getting the Huawei tablet, I was confused by its system version number…

In the system settings, the HarmonyOS version is displayed, and the version number is 2.0.0.
Checked online, this version number has been used for many years…

Huawei HarmonyOS

Click to upgrade, you can see that there is a smaller version number:

  • Version before upgrade: 2.0.0.260
  • Upgraded version: 2.0.0.275

In order to determine the compatibility, I would like to know the corresponding relationship between the HarmonyOS system and the Android version.

The relationship between HarmonyOS and Android

According to the Internet, Harmony OS 2.0 is based on the Andriod Open Source Project (AOSP, Android Open Source Project).

In the actual test, connect the Huawei tablet to the development machine, Android Studio shows Android 10, API version number 29.

Print the SDK version number in the code

Log.d(TAG, "SDK Version: " + Build.VERSION.SDK_INT);

The printed result is also:

29

The description is indeed as stated on the Internet, HarmonyOS is based on Android 10 for subsequent development.

Try to avoid using new APIs after Android 10.

targetSdk

If so, you should really change targetSdk to 29.

Digression

The hardware workmanship of the Huawei tablet is indeed not inferior to the iPad, but the system experience is really not good, and the operation is very weird. I can’t figure it out many times, let alone the elderly.

refer to