Note: To access all shared projects, get information about environment setup, and view other guides, please visit Explore-In-HMOS Index.
This app shows how to create a widget (shown in the cards page of the watch), and implement two way data transfer.
- Use 2*3 widget. (Shown in the Cards page of the watch)
- Real time data transfer between app and the widget.
- Languages: ArkTS, ArkUI
- Frameworks: HarmonyOS SDK 5.1.0(18)
- Tools: DevEco Studio Version 5.1.1.830
- Libraries:
@kit.FormKit@kit.ArkData@kit.IPCKit@kit.SensorServiceKit
ohos.permission.VIBRATETo add vibration feedback
ohos.permission.KEEP_BACKGROUND_RUNNINGTo run the app in the background
entry/src/main/ets/
├───entryability
│ EntryAbility.ets
├───entrybackupability
│ EntryBackupAbility.ets
├───model
│ FormIdData.ets
│ Mode.ets
│ ModeParcelable.ets
├───mymode
│ └───pages
│ MyModeCard.ets
├───mymodeformability
│ MyModeFormAbility.ets
├───pages
│ Index.ets
└───util
ModePrefs.ets
WidgetIdPrefs.ets
- Huawei Watch 5
CardWidget is distributed under the terms of the MIT License See the LICENSE for more information.

