Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
If you are using Android Studio, you can choose to use the Java or Kotlin sample code as you need to implement the functions of signing in with a HUAWEI ID in authorization code or ID token mode and signing out of a HUAWEI ID.
Sample Code | Find It on Gitee | Find It on GitHub |
|---|---|---|
Java sample code | ||
Kotlin sample code |
Before using the sample code, read the README file in the sample project carefully. Run the sample code only after you complete the following operations:
Sign in to AppGallery Connect, download the agconnect-services.json file of your app, and copy the file to the app directory of the sample project.
Open the build.gradle file in the sample project, and change the value of applicationId to your app package name.
If you are using Eclipse, use the Java sample code to implement the functions of signing in with a HUAWEI ID in authorization code or ID token mode and signing out of a HUAWEI ID.
Sample Code | Find It on Gitee | Find It on GitHub |
|---|---|---|
Java sample code |
If you are using HUAWEI DevEco Studio, use the Java sample code to implement the functions of signing in with a HUAWEI ID in authorization code or ID token mode and signing out of a HUAWEI ID.
Sample Code | Find It on Gitee | Find It on GitHub |
|---|---|---|
Java sample code | ||
JavaScript sample code |
Before using the sample code, read the README file in the demo project carefully. Run the sample code only after you complete the following operations:
If you are using HUAWEI DevEco Studio, use the TypeScript sample code to implement the functions of signing in with a HUAWEI ID in authorization code or ID token mode.