- Huawei Developer Account (not required if you don't plan to publish to AppGallery)
- Laptop
- Android Phone
-
Register as a Developer
- Register as a developer and complete identity verification. Refer to Registering a HUAWEI ID and Applying for the HUAWEI ID Service for details.
-
Install HUAWEI DevEco Studio
- Download and install HUAWEI DevEco Studio from here.
-
Generate Key and CSR
-
Create a Harmony App
- Create a Harmony app in the App Gallery Connect Console under the project you created in step 1.
-
Register Your Wearable Device
- Register your wearable device in the App Gallery Connect Console by navigating to
Users and Permissions > Device Management > Add Device
. - You will need the name, type, and UDID of the device. To find the UDID:
- Download and install HUAWEI DevEco Assistant and HUAWEI Health from AppGallery on your Huawei phone.
- Open HUAWEI DevEco Assistant and tap the Lite Wearable tab.
- Tap Connect. This will open HUAWEI Health.
- In HUAWEI Health, tap the Devices tab, then tap Add.
- Tap Smart Watch and select a watch model to connect to.
- Tap PAIR and follow the instructions. The watch model and UDID will be displayed on the HUAWEI DevEco Assistant screen. Tap Copy to copy the UDID to the clipboard.
- Register your wearable device in the App Gallery Connect Console by navigating to
-
Create a Certificate in the Console
-
Create an HAP Provision Profile
-
Register the Signing Configurations
- In DevEco Studio, select
File > Project Structure > Project > Signing Configs
. - In the debug section, check the
Automatically generate signing
checkbox. Optionally, generate a signing config for Release as well. - Upload your
.cer
and.p7b
files downloaded from the Console.
- In DevEco Studio, select
-
Build HAP and Run Your Project
- In DevEco Studio, navigate to
Build > Build Hap(s) App(s) > Build Hap(s)
. - After a successful build, the signed and unsigned HAP files will be available under
Entry > Build > Outputs > Hap > Debug
. - Transfer the HAP file to your phone, then to your wearable device to run it.
- In DevEco Studio, navigate to
For a detailed guide on the development process, refer to this Medium article or the Huawei Developer Documentation.