{"id":22441389,"url":"https://github.com/hms-core/hms-identity-demo","last_synced_at":"2025-08-01T18:32:16.322Z","repository":{"id":45504471,"uuid":"264943470","full_name":"HMS-Core/hms-identity-demo","owner":"HMS-Core","description":"Identity demo code encapsulates APIs of the HUAWEI Identity Kit. It provides demo programsfor your reference or usage.","archived":false,"fork":false,"pushed_at":"2023-09-01T03:03:27.000Z","size":1723,"stargazers_count":11,"open_issues_count":0,"forks_count":11,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-16T12:54:17.136Z","etag":null,"topics":["address","hms","hms-identity","identity","java"],"latest_commit_sha":null,"homepage":"https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/about-the-service?ha_source=hms1","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HMS-Core.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-18T13:11:26.000Z","updated_at":"2022-07-14T11:41:59.000Z","dependencies_parsed_at":"2022-09-09T23:25:01.924Z","dependency_job_id":null,"html_url":"https://github.com/HMS-Core/hms-identity-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-identity-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-identity-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-identity-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-identity-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HMS-Core","download_url":"https://codeload.github.com/HMS-Core/hms-identity-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228397819,"owners_count":17913540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","hms","hms-identity","identity","java"],"created_at":"2024-12-06T02:14:21.056Z","updated_at":"2024-12-06T02:14:21.776Z","avatar_url":"https://github.com/HMS-Core.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Huawei Identity Demo\n\nEnglish | [中文](README_ZH.md)\n\nThe demo App demonstrates Identity Kit client APIs and usages. \n\nDocumentation can be found at this \n\n[link](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/introduction-0000001050040471).\n\n\n## Table Of Content\n\n- [Introduction](#introduction)\n- [Environment requirement](#environment-requirement)\n  - [develop requirement](#develop-requirement)\n  - [Runtime requirement](#runtime-requirement)\n- [Installation](#installation)\n- [Tutorial](#tutorial)\n- [Code Examples](#code-examples)\n- [License](#license)  \n\n\n## Introduction\n\nThe demo implements the Identity Kit API to obtain the user address interface, and assembles and returns the selected address information to the interface.\n\n\n## Environment requirement\n\n### Develop requirement\n\nTo be able to develop, build and debug this demo, you will need at least the following environment:\n\n* a connection to Internet, for downloading package dependencies form HUAWEI and Google\n\n* a compatible IDE, Android Studio is recommended.\n\n* a gradle installation will be downloaded when you use command line gradle wrapper or \n    open downloaded folder in compatible IDE\n\n* an Android SDK installation, API version 28 or above is recommended.\n\n### Runtime requirement\n\nTo be able to run this demo, you will need an Android device with EMUI 3.0 or above, \nAndroid 4.4 and above, with Huawei Mobile Service (HMS) pre-installed.\n\nIf the HMS is missing, the device will prompt you to install or upgrade HMS first on calling Identity SDK.\n\n\n## Installation\n\n1. Clone or download this project and open the downloaded folder in Android Studio or compatible IDE.\n\n2. use IDE's functionality to install configured project on to your device.\n\n\n## Tutorial\n\n1. Once you start the demo, you should be able to see the following page.\n\u003cimg src=\"images/en-us_image_0210355807.png\" alt=\"mainpage\" height=\"600\"/\u003e\n\n2. Click to **get Huawei User Address** button. After selecting the specific address, click OK. The following result will be displayed.\n\u003cimg src=\"images/en-us_image_0210355809.png\" alt=\"resultpage\" height=\"600\"/\u003e\n\n\n## Code Examples\n\n### Obtaining a User Address\n\n1. Instantiate the request object by using the **new UserAddressRequest** method. Then, call the **getUserAdddress** API.\n   The code location is in the getUserAddress method in the `src/app/src/main/java/com/huawei/demo/identitydemo/MainActivity.java` file.\n\n2. Display the address selection page by calling the **startResolutionForResult** method of **Status**.\n   The code location is in the startActivityForResult method in the `src/app/src/main/java/com/huawei/demo/identitydemo/MainActivity.java` file.\n\n3. After the user selects an address, call the **parseIntent** method of **UserAddress** in **onActivityResult** of the page and obtain the address from the returned result.\n   The code location is in the onActivityResult method in `the src/app/src/main/java/com/huawei/demo/identitydemo/MainActivity.java` file.\n\n## Question or issues\nIf you want to evaluate more about HMS Core, [r/HMSCore on Reddit](https://www.reddit.com/r/HuaweiDevelopers/) is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.\n\nIf you have questions about how to use HMS samples, try the following options:\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Frequent) is the best place for any programming questions. Be sure to tag your question with \n`huawei-mobile-services`.\n- [Huawei Developer Forum](https://forums.developer.huawei.com/forumPortal/en/home?fid=0101187876626530001) HMS Core Module is great for general questions, or seeking recommendations and opinions.\n\nIf you run into a bug in our samples, please submit an [issue](https://github.com/HMS-Core/hms-identity-demo/issues) to the Repository. Even better you can submit a [Pull Request](https://github.com/HMS-Core/hms-identity-demo/pulls) with a fix.\n\n## License\n\nThis demo is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhms-core%2Fhms-identity-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhms-core%2Fhms-identity-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhms-core%2Fhms-identity-demo/lists"}