Skip to content

A demo how to make a live score app on Huawei Wearables inklusive Android implementation

License

Notifications You must be signed in to change notification settings

minkiapps/LiveScore-Wearable-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Live Score Demo for Huawei Wearables

This demo project shows how to implement a Huawei wearable app to show current live scores of various sport matches. The project consists of an Android and HarmonyOS app (Wearable app).

Android

The Android app is responsible to make the API call and transfer the result via Huawei Wearengine to wearable app. The project is written in Kotlin and Jetpack Compose. The main mechanic is to start a Foreground Service which maintains the Wearengine connection between phone and watch, whenever the watch app is requesting data, the Foreground Service fetches the data through API and transfer a JSON to watch.

Demo

ezgif com-gif-maker (3)

HarmonyOS (hos)

The HarmonyOS app is responsible of displaying the live score data which is received from the Android app in a list UI element. Various wearable device models are supported in the project, each device model code is encapsulated in a own Gradle module. All code are written in Javascript, HML and CSS.

  • Huawei Sportwatch (Litewearable)
    • Watch GT2 Pro
    • Watch GT Runner
    • Watch GT3 and GT3 Pro
    • Watch Fit2
  • Huawei Smartwatch (Smartwearable)
    • Watch3

Use Gradle module gt2 for GT2 Pro
Use Gradle module gt3 for GT Runner, GT3, GT3 Pro
Use Gradle module yoda for Fit2
Use Gradle module watch3 for Watch3

Demo

GT2Pro GT Runner GT3 GT3Pro Fit2
ezgif com-gif-maker (1) gt3_runner gt3 gt3pro yoda_new
Watch3
ezgif com-gif-maker

Installation and Setup

Android

Get the latest Android Studio version to build the Android project. RapidAPI (Basic is free) is used for live score data, register here to obtain an API key and configure it in local.properties with API_KEY=xxxxxx.

HarmonyOS

Get the latest DevEco Studio version to build the HarmonyOS project. Apply for wearengine in Huawei Developer Console, configure signing and bundle name of HarmonyOS project. Refer to official documentation for details how to do it.

Be aware I created a convenient script for fast deployment of different litewearable modules at same time.







Icons in the app are taken from flaticon.

About

A demo how to make a live score app on Huawei Wearables inklusive Android implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages