HarmonyOS is a family of operating systems developed by Huawei to developer as part of the initiatives for the all-scenario strategy, adaptable to mobile office, fitness and health, social communication, and media entertainment, to name a few. HarmonyOS is built on a distributed architecture designed based on a set of system capabilities. It is able to run on a wide range of device forms, including mobile phones, tablets, wearables, smart TVs, head units.
Questions tagged [harmonyos]
131 questions
2
votes
2 answers
How to get PNG format icon as a attribute in custom component (HarmonyOS)
I am creating a custom component in HarmonyOS using Java SDK, Where I need one attribute to get Element(i.e. VectorElement or png format icon) as input from xml layout file.
for ex:
ohos:sliderIcon="$graphic:custom_icon"…

C2C
- 85
- 6
2
votes
2 answers
What is the alternative in harmonyos for ValueAnimator.ofInt(int... values)?
I am creating a custom component in HarmonyOS using Java SDK. Where I have to work on Animation for animate component.
I have to animates component between int values. For that I need the instance of AnimatorValue(In Android ValueAnimator).
In…

C2C
- 85
- 6
2
votes
1 answer
what is the alternative in harmonyos for TypedValue.applyDimension(int unit, float value, android.util.DisplayMetrics metrics)?
I am writing a custom component in HarmonyOS using Java SDK.
I am trying to convert vp to Px.
In Android we can convert dp to px using below code.
TypedValue.applyDimension(
int unit,
float value,
…

C2C
- 85
- 6
2
votes
1 answer
Is HarmonyOS JS UI framework similar to React-Native UI framework?
Will the development of HarmonyOS JS affect its performance? Is it similar to the operating principle of UI frameworks like React-Native?

Zinna
- 1,947
- 2
- 5
- 20
1
vote
1 answer
Adb backup does not work on my HarmonyOS 2.0 phone
When I tried to back up my app data, it doesn't work. Specs are listed below:
Huawei mate 10
HarmonyOS 2.0.0
version: 2.0.0.230
I just run
adb backup -f phi.ab -noapk -noshared -nosystem com.PigeonGames.Phigros
when the app that I want to backup…

OrderChaos
- 9
- 3
1
vote
0 answers
Previewer not loading tag in DevEco Studion 3.0.0.900?
I was making some library functions for using the camera in OpenHarmony for the JS API. When I used the tag in the HML file, the Previewer couldn't load it. Moreover, DevEco Studio 3.0.0.900 doesn't support emulators, so I have no other way to test…

Ankit Oscar
- 11
- 1
1
vote
2 answers
Can I connect the Huawei HarmonyOS emulator in VS.Code?
I am developing a mobile application with VS Code, and my phone launches on a Huawei operating system (Harmony OS). Can I connect them and launch the app on my phone?

Elena Nikolova
- 11
- 3
1
vote
1 answer
How to add border to a circle image in DevEco Studio?
Whenever I am using border-radius property the border to the image is not coming but when I am not using the border-radius property the square image is coming along with the border.[

Muskan Khowala
- 49
- 3
1
vote
0 answers
How to change checkbox label value in DevEcoStudio Previewer according to selected language?
I am using DevEco Studio 3.0.0.800, I created a select form element and added an option od datetime which launches a datetime picker. The default datetime picker changes according to language but the checkbox inside the picker remains in Chinese. I…

Susanto
- 11
- 2
1
vote
3 answers
DevEcoStudio: Previewer did not get installed
I have an issue related to installing previewer. When I installed DevEcoStudio version 3.0.0.800, previewer did not get installed. On opening previewer it was showing error as "Getting SDK path failed".

Muskan Khowala
- 49
- 3
1
vote
0 answers
Harmony OS Card Emulation
Hi, I am trying to implement HostService for communication with a payment terminal, however, my HostService is never started, when I try to perform payment on a terminal with NFC. I use Huawei Watch 3 and PAX terminal for testing.
Code in…

Maros Zelo
- 53
- 7
1
vote
0 answers
HarmonyOS smartwatch import system things error
https://developer.harmonyos.com/en/docs/documentation/doc-references/js-apis-network-uploading-downloading-0000000000626076
I trying to import system things:
import network from '@system.network';
import vibrator from '@system.vibrator';
import…

lacas
- 13,928
- 30
- 109
- 183
1
vote
2 answers
Wear Engine how to cancel/abort file sending on wearable (Java)?
I use Wear Engine to send files from watch (HarmonyOS) to phone (Android).
I can't find any method to cancel/abort file transfer. I imagine a file can weigh many megabytes and there is no option to stop the bytes transfer.
P2pClient object doesn't…

grendelb
- 31
- 2
1
vote
1 answer
HarmonyOS wearable JS scrollbars
How to create scrollViews in harmonyOS? CSS/HTML/JS accepted, not java, because I develop on smart devices.
Android:

lacas
- 13,928
- 30
- 109
- 183
1
vote
1 answer
Missing tags in DevEco Studio, HarmonyOS
I am using DevEco Studio 2.1.0.501 IDE. I want to create a simple LITE watch application for smart device.
1, Is there any way to use more languages like java or kotlin (I don't really like JS)? I came from Android Studio.
2, I want to use this…

lacas
- 13,928
- 30
- 109
- 183