目录

Getting Started

Quick Tutorial

Before developing your app, you can follow instructions in the codelab to experience how to quickly integrate this kit into an app.

Development Environment

Supported Devices

Device Type

OS Version

HMS Core (APK) Version

Phone and tablet

HarmonyOS 2.0 or later

5.0.0.300 or later

Telematics device

HarmonyOS 2.0 or later

6.2.0.300 or later

Huawei Vision and smartwatch (wearable, not lite wearable)

HarmonyOS 2.0 or later

6.5.0.300 or later

  1. The SDK for HarmonyOS (JavaScript) can be used only when your app has only one HarmonyOS Ability Package (HAP).
  2. The SDK for HarmonyOS (JavaScript) does not support hybrid packaging.

Development Process

Follow the steps below when you develop an app.

No.

Step

Description

1

Preparations

Before developing a HarmonyOS app, make the following preparations:

  1. Prepare a development environment.
  2. Configure app information in AppGallery Connect.
  3. Configure app signing.
  4. Integrate the HMS Core SDK.
  5. Configure obfuscation scripts.

2

Signing In with a HUAWEI ID

Account Kit allows for sign-ins in authorization code or ID token mode, which you can choose to implement as needed.

Silently Signing In

User authorization is required only for the first sign-in to your app using a HUAWEI ID. Subsequent sign-ins using the same ID do not require any authorization.

Quick HUAWEI ID Sign-In to Apps That Apply for Only the OpenID or UnionID

Users can quickly sign in to an app when it requests only the unique HUAWEI ID identifier (OpenID or UnionID). In this case, Account Kit does not display the authorization prompt. The sign-in is authorization-free.

Signing Out of a HUAWEI ID

After signing in to an app using a HUAWEI ID, the user can sign out of the ID as needed. After the user signs out, the app will notify the Account SDK to clear the user's ID information.

Canceling Authorization

To improve privacy security, your app should allow users to cancel authorization.