HmsAnalyticsKitDemo is a QuickApp client that applying HUAWEI Hianalytics SDK used for showing how to collect user engagement and user preference. Read more about Hianalytics.
-
Use HUAWEI QuickApp IDE to open the decompressed project, we provide two demos:
- quickapp.hmsanalyticskitdemo: this is a completed code for the sample app.
- quickapp.hmsanalyticskitdemo-start: this is a starting code that you'll build upon during this codelab.
-
Use the "Npm -> Start Npm Library" to generate "package.json" file.
-
Run the following command to install the AnalyticsKit SDK for QuickApp:
npm install --save @hmscore/analytics-sdk-quickapp
Create a QuickApp in AppGallery Connect and obtain the project configuration, then copy it to your QuickApp project.
Hardware requirements:
- A computer
- An Android phone
Software requirements:
- The HUAWEI QuickApp IDE
- The package manager npm , which typically comes with Node.js
- The codelab's sample code
- A terminal/console
After running the app you should see a screen like this:
Click the button TRUE or FALSE to answer the question; Click the NEXT, show the next question; Click POST SCORE, log the score user got. All the infomations will be upload to Hianalytics, and you can see these infomations in real time using Real-time.
Click button SETTINGS:
You will be asked what your favorite sport is. This choice will be logged to Hianalytics as a User Property.
HmsAnalyticsKitDemo is licensed under the Apache License, version 2.0.