Connect with us

Huawei News

How to use HarmonyOS local emulator

Published

on

At the Huawei Developer Conference (HDC 2021) in 2021, Huawei launched the local emulator for the first time with the release of DevEco Studio 3.0 Beta 1, which supports the simulated mobile phone category.

Huawei introduces the version evolution of the HarmonyOS local emulator and shared a tutorial about how to use the HarmonyOS local emulator.

1. The version evolution of the local emulator

On December 31, 2021, after a version of iterative optimization, the local simulator released with DevEco Studio 3.0 Beta2 added a new category of simulators for smart watches and smart screens.

The local simulator has customized its unique characteristics according to the characteristics of smart watches and smart screens.

Advertisement

Smart watch: Supports analog data injection of heart rate and steps, and supports the simulation of rotating the crown button.

The version evolution of the local emulator-1

Smart screen: supports the simulation of remote control.

The version evolution of the local emulator-2

Through the above introduction to the local emulator, it is not difficult to see that the local emulator has the following advantages:

It runs directly on the user’s local computer, does not require login authorization, has zero delay, and is not limited by the duration of use, and has the same performance as the real machine.

Provides a variety of general device simulations such as audio, battery, location, etc., providing developers with a running environment that approximates the real machine.

Advertisement

Provide product-specific simulations for Huawei devices, such as the rotation and pressing function keys of smart watches, and the remote control simulation of smart screens.

Supports Java, JS, C / C++ single-language debugging and JS+Java cross-language debugging capabilities, helping developers to debug applications more conveniently and efficiently.

2. Preparations before use

After understanding the local emulator, the following will focus on explaining how to use the local emulator. Before using the local emulator, you need to do the following preparations:

1. The local emulator is created and run on the local computer. Make sure that the local computer meets the following resource requirements:

Advertisement

Windows system: 8GB and above

macOS system: 8GB and above

Note: Running a local emulator on a virtual machine system is not supported, for example on an Ubuntu system, by installing a Windows virtual machine and then using the Windows system to install and run the emulator.

2. Check the version of DevEco Studio:

DevEco Studio V3.0 Beta1 and later versions only support local emulators. Currently, DevEco Studio V3.0 Beta2 is recommended.

Advertisement

3. Before using the local emulator, you need to install the corresponding image package. The specific operations are as follows:

(1) Open DevEco Studio and select “Files > Settings” (for macOS, select “DevEco Studio > Preferences”).

(2) As shown in Figure 3, on the “SDK Manager > HarmonyOS Legacy SDK” tab, select the image package under “Platforms”. Different image packages correspond to different device types. The System-image-phone image package corresponds to mobile phones, the System-image-tv image package corresponds to smart screens, and the System-image-wearable image package corresponds to smart watches.

Download the image package

(3) Click “Apply” to install.

4. Install the local emulator.

Advertisement

Select “Tools> Device Manager” in the menu bar, enter the interface shown in Figure 4, and click “Install” to install the local emulator.

Install the local emulator

3. Create and use a local emulator

After completing the above preparations, the next step is the focus of this article, teaching you how to create and use a local emulator.

1. (Optional) Customize the local emulator file storage path.

The default storage path for local emulator files is:

Advertisement

C:\Users\username\AppData\Local\Huawei\HarmonyOSEmulator\deployed . If the space on the C drive is tight, you can add a system environment variable HarmonyOS_HVD_HOME to customize the storage path to point to a directory with ample space.

2. Create a local emulator.

(1) Open DevEco Studio and select “Tools > Device Manager”. As shown in Figure 3, in the Local Emulator tab, click the New Emulator button in the lower right corner to start creating a local emulator.

(2) Select a device to create a local emulator.

As shown in Figure 4, DevEco Studio provides three devices, Huawei_Phone, Huawei_TV and Huawei_Wearable by default, corresponding to mobile phones, smart screens and smart watches respectively. According to the characteristics of Huawei devices, DevEco Studio presets parameters such as size and resolution for these three devices.

Advertisement

Select a device

Developers can click the clone icon after New Hardware or Huawei_Phone to create a new mobile device and customize the device’s name, size, resolution, memory and other parameters.

Custom phone parameters

The developer selects a device from the default three devices or the created mobile device to create a local emulator.

(3) After selecting the device, click Next to see the image information of the local emulator.

(4) Click Next again to check the configuration information of the local emulator, and modify the configuration information if necessary. After confirmation, click Finish to complete the creation of the local emulator.

After the creation is successful, you can see the newly created local emulator on the Local Emulator tab, as shown in Figure 8.

Advertisement

3. Run the local emulator.

(1) On the Local Emulator tab, click to start the local emulator.

(2) Click the button in the DevEco Studio toolbar to run the project, or use the default shortcut key Shift+F10 (Control+R for Mac) to run the project.

(3) DevEco Studio will start the compilation and construction of the application, and the application can be run on the local simulator after completion. Taking the mobile phone device as an example, the operation effect.

Running the local emulator

The mobile phone local simulator shown in Figure 8, in addition to being directly operated on the mobile phone screen like a real phone, the toolbar on the right provides convenient operation and rich data injection capabilities, including: volume adjustment, battery simulation, GPS simulation, Network simulation, virtual sensor simulation, etc.

Advertisement

The local simulator currently supports three device types: mobile phone, smart watch and smart screen. Figure 11 shows the same set of codes running on three devices: smart watch, mobile phone and smart screen at the same time.

4. Conclusion

This issue introduces the use of the local simulator, have you mastered it? Welcome to use and explore more rich features of the local emulator~

In the process of using the local emulator, if you encounter any problems, please refer to the FAQ: Local Emulator >>

If the problem is still not resolved, you can provide feedback through the Huawei Developer Forum .

Advertisement

(Via)

Huawei News

Huawei Smart Screen S5 Pro sale details

Published

on

By

Huawei Smart Screen S5 Pro (1)

Huawei officially started the sale of its new Smart Screen S5 Pro. The latest smart screen comes with three sizes of 65/75/85 inches and supports Huawei Lingxi pointing remote control, 4K super projection and other functions.

Huawei Smart Screen S5 Pro sale price

  • 65 inches 6499 yuan
  • 75 inches 8499 yuan
  • 86 inches 11999 yuan

The entire Huawei Smart Screen S5 Pro series supports Lingxi pointing remote control , which can realize operations such as sliding, tapping, dragging, circling and jumping; the smart screen supports the super desktop function, which can realize large-screen operation of mobile phone apps.

Huawei Smart Screen S5 Pro is equipped with a 4K flagship main core + AI vision chip, which can realize functions such as smooth portrait tracking, AI fitness, children’s sitting posture and distance reminders, AI somatosensory games, ambient light perception, etc.; it has 3 pre-installed HDMI2.1 interfaces, standard 4GB+128GB storage combination, and supports dual-band Wi-Fi 6.

The Huawei Smart Screen S5 Pro series is equipped with a four-unit audio system as standard, which supports surround stereo effects. Users can cast 4K video content from apps such as Huawei Video, Bilibili, Mango TV, Tencent Video, Youku Video, and iQiyi to the smart screen , with a frame rate of 60FPS and a delay of about 80 milliseconds.

Huawei Smart Screen S5 Pro (1)

Continue Reading

Huawei News

Huawei MateBook GT laptop arriving soon

Published

on

By

Huawei MateBook GT

Huawei is expected to release a new MateBook GT 14 laptop. The device appeared on the Huawei Smart Life App in May this year. The 3C certification information shows that the computer model is ENZH, produced by Wuxi Dengyuan Electronic Technology Co., Ltd., and is equipped with the same 140W power adapter as the MateBook X Pro 2024.

As per the Geekbench benchmark database, the ENZH laptops have three processor versions: Intel Core Ultra 5 125H / Ultra 7 155H / Ultra 9 185H .

In addition, the launch of Hongmeng Smart S9 and Huawei’s all-scenario new products has been officially announced to be held on August 6, which will bring a variety of products such as headphones, mobile phones, smart screens, etc.

Huawei MateBook GT

Continue Reading

Huawei News

Huawei Smart Screen S5 Pro comes with 4 speakers

Published

on

By

Huawei Smart Screen S5 Pro comes with 4 speakers

Huawei Smart Screen S5 Pro is all set to go on sale tomorrow. It has now appeared in the Huawei Smart Life App and has three size versions to choose from.

Huawei Smart Screen S5 Pro has three sizes, all equipped with 4 speakers as standard , and no ads when turned on by default. Huawei Smart Screen S5 Pro series sizes are 65 inches, 75 inches and 86 inches.

The screen material is LCD, supports 120Hz/240Hz refresh rate, and the entire series is standard with 4 speakers and 4GB+128GB memory combination, and supports dual-band WiFi 6 and HDMI 2.1.

Huawei Smart Screen S5 Pro comes with 4 speakers

Continue Reading

Most Popular