目录

HarmonyOS Sample Code (Java)

The sample code provides a demo project that demonstrates how to call open APIs of Analytics Kit. Guided by the demo, you will learn how to:

Sample Code

Find It on Gitee

Find It on GitHub

HUAWEI DevEco Studio sample code

Click here

Click here

Before using the sample code, read the README file in the sample project carefully. You can use the sample code only after completing the following operations:

  1. Sign in to AppGallery Connect, download the agconnect-services.json file of your app, and copy the file to the entry directory of the demo project.

  2. Open the config.json file in the entry directory of the sample project, and change the value of bundleName to your app package name. In the abilities element, declare the AppGallery Connect provider and replace com.example.myapplication with your app package name.