Home > Net >  How to find the alternative class/method for harmonyOS in androidOs?
How to find the alternative class/method for harmonyOS in androidOs?

Time:10-27

I am a fresher who works on HarmonyOS where we have to map android imports to respected to HarmonyOs using an excel sheet, which consists of alternative imports but some are missing in that Excel. where can I find all the alternative methods?

CodePudding user response:

You can refer this example for Java Harmony OS APIs for Android developers.

https://medium.com/huawei-developers/java-harmonyos-api-for-android-developers-cheatsheet-9de077561732

For some classes direct one to one mapping might not be available for now.

In HarmonyOS developer doc there is Reference Document Outline for Java APIs, Native APIs. Please check https://developer.harmonyos.com/en/docs/documentation/doc-references/reference-document-outline-0000001115016824

CodePudding user response:

There is no direct substitution or mapping between the methods of HarmonyOS and Android. You need to query the official APIs based on the site requirements to find a method that meets the requirements.

API reference documents provide you guidance in using the APIs of different programming languages, as well as standards and specifications required for app development with these APIs.

Java API References

JS API References

  • Related