{"id":22441338,"url":"https://github.com/hms-core/hms-wallet-clientdemo-android","last_synced_at":"2025-07-01T05:05:57.312Z","repository":{"id":45628051,"uuid":"279611015","full_name":"HMS-Core/hms-wallet-clientdemo-android","owner":"HMS-Core","description":"Sample code encapsulates APIs of the HUAWEI Wallet Kit client. It provides many sample programs for your reference or usage.","archived":false,"fork":false,"pushed_at":"2022-04-02T02:01:35.000Z","size":1518,"stargazers_count":12,"open_issues_count":0,"forks_count":10,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-08T05:43:38.775Z","etag":null,"topics":["hms","huawei","passes","wallet"],"latest_commit_sha":null,"homepage":"https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/wallet-guide-introduction?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-07-14T14:39:39.000Z","updated_at":"2023-09-12T06:12:49.000Z","dependencies_parsed_at":"2022-09-11T22:50:55.117Z","dependency_job_id":null,"html_url":"https://github.com/HMS-Core/hms-wallet-clientdemo-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HMS-Core/hms-wallet-clientdemo-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-wallet-clientdemo-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-wallet-clientdemo-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-wallet-clientdemo-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-wallet-clientdemo-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HMS-Core","download_url":"https://codeload.github.com/HMS-Core/hms-wallet-clientdemo-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-wallet-clientdemo-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262900188,"owners_count":23381663,"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":["hms","huawei","passes","wallet"],"created_at":"2024-12-06T02:14:12.335Z","updated_at":"2025-07-01T05:05:57.289Z","avatar_url":"https://github.com/HMS-Core.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HMS Wallet Kit Sample\n\nEnglish | [中文](README_ZH.md)\n\n## Table of Contents\n\n * [Introduction](#introduction)\n * [Installation](#installation)\n * [Supported Environments](#supported-environments)\n * [Sample Code](#sample-code)\n * [License](#license)\n\n\n## Introduction\nThis sample code invokes HUAWEI Wallet Kit client APIs. It provides many sample methods for your reference or usage.\n\n## Installation\nBefore using the sample code, check whether the android environment has been installed.\nDecompress the sample code package.\n    \nImport the decompressed project to your Android Studio.\nRefresh and sync the project.\nRun the sample on Android device or emulator.\n    \n## Supported Environments\nAndroid Studio 3.X\nJava JDK(1.8 or later)\nSDK Platform(26 or later)\nGradle(4.6 or later)\n\t\n## Sample Code\nThe sample code provides two methods for adding passes: Claiming passes by app, quick app, or HUAWEI Wallet CardStore and Claiming passes by web page, SMS message, email, or app.\n\n1. **Claiming passes by app, quick app, or HUAWEI Wallet CardStore：**\nCurrently, this mode is available only in the Chinese mainland.\n\n- Applying for the Wallet Kit Service.\nDevelopers need to apply for the Wallet Kit Service. You should apply for a service ID and obtain a certificate, which is used to encrypt pass package.\n[Chinese](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides-V5/guide-agc-overview-0000001050158420-V5) / [English](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/guide-agc-overview-0000001050158420-V5)\n\n- The developer uses the server demo to generate a pass package.\nA developer needs to generate a voucher package using the server demo.\nFor details about how to generate voucher packages using the server demo, see [huawei-wallet-server-windows-passsdk-demo.zip](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Examples-V5/java-sample-code-0000001050157448-V5)\n\n- Push the pass package to the Huawei Pay app.\nThe developer replaces createPassData() in TestUtil.java. This step is only used to simulate card adding. In the actual situation, the developer needs to obtain the card and pass package data from the developer server.\n\n2. **Claiming passes by web page, SMS message, email, or app:**\n- Applying for the Wallet Kit Service.\nDevelopers need to apply for the Wallet Kit Service. You should apply for a service ID and generate a pair of RSA keys (the private key is used to encrypt JWE data).\n[Chinese](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides-V5/guide-agc-overview-0000001050158420-V5) / [English](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/guide-agc-overview-0000001050158420-V5)\n\n- Push models to Huawei servers.\nThis step needs to be performed before the developer uses the demo to add pass instances. For details, see the development guide.\n[Chinese](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides-V5/guide-webpage-0000001050042334-V5#ZH-CN_TOPIC_0000001050159047__section179891059101817) / [English](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/guide-webpage-0000001050042334-V5#ZH-CN_TOPIC_0000001050159047__section179891059101817)\n\n- Use the demo to convert a pass instance into JWE and push the JWE to the Huawei server.\nDevelopers need to replace the private key in Constant.java. The private key is obtained from step 1. The private key is used to encrypt JWE data. After JWE data is generated, it can be pushed to Huawei servers. After the push is successful, users can view the pass card in Huawei Pay.\n\n## Question or issues\nIf you want to evaluate more about HMS Core,\n[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) 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-scan-demo/issues) to the Repository. Even better you can submit a [Pull Request](https://github.com/HMS-Core/hms-scan-demo/pulls) with a fix.\n\n##  License\nWallet Kit SDK sample 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-wallet-clientdemo-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhms-core%2Fhms-wallet-clientdemo-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhms-core%2Fhms-wallet-clientdemo-android/lists"}