{"id":22441386,"url":"https://github.com/hms-core/hms-push-clientdemo-android","last_synced_at":"2025-08-01T18:32:13.595Z","repository":{"id":51204945,"uuid":"264593665","full_name":"HMS-Core/hms-push-clientdemo-android","owner":"HMS-Core","description":"Huawei Push Kit sample code for Android client. HUAWEI Push Kit is a messaging service provided by Huawei for developers. It establishes a messaging channel from the cloud to devices. ","archived":false,"fork":false,"pushed_at":"2023-08-22T08:32:04.000Z","size":15633,"stargazers_count":77,"open_issues_count":5,"forks_count":31,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-16T12:54:17.349Z","etag":null,"topics":["android","hms","huawei","java","push","push-notifications","sendmessage"],"latest_commit_sha":null,"homepage":"https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/push-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,"governance":null}},"created_at":"2020-05-17T05:49:52.000Z","updated_at":"2024-01-14T12:33:31.000Z","dependencies_parsed_at":"2023-01-30T18:01:22.478Z","dependency_job_id":"100857f0-ca6a-4375-9ab0-7edd044258de","html_url":"https://github.com/HMS-Core/hms-push-clientdemo-android","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-push-clientdemo-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-push-clientdemo-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-push-clientdemo-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMS-Core%2Fhms-push-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-push-clientdemo-android/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":["android","hms","huawei","java","push","push-notifications","sendmessage"],"created_at":"2024-12-06T02:14:20.751Z","updated_at":"2024-12-06T02:14:21.380Z","avatar_url":"https://github.com/HMS-Core.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HMS Core Push Kit Sample Code (Android)\n[![Apache-2.0](https://img.shields.io/badge/license-Apache-blue)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://developer.huawei.com/consumer/en/hms)\n[![Open Source Love](https://img.shields.io/badge/language-java-green.svg)](https://www.java.com/en/)\n\nEnglish | [中文](README_ZH.md)\n\n## Contents\n\n * [Introduction](#Introduction)\n * [Preparations](#Preparations)\n * [Installation](#Installation)\n * [Environment Requirements](#Environment-Requirements)\n * [Hardware Requirements](#Hardware-Requirements)\n * [License](#License)\n\n\n## Introduction\nIn this sample code, you will use the created demo project to call APIs of Push Kit. Through the demo project, you will:\n1.\tObtain a token of Push Kit.\t\n2.\tReceive notification messages or data messages from Push Kit.\n\n\u003cimg src=\"pushDemo.gif\" width=250 title=\"ID Photo DIY\" div align=center border=5\u003e\n\nFor more information, please refer to\n[Service Introduction](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/service-introduction-0000001050040060?ha_source=hms1).\n\nYou can use HMS Toolkit to quickly run the sample code. HMS Toolkit supports one-stop kit integration, and provides functions such as free app debugging on remote real devices. To learn more about the integration by HMS Toolkit, please refer to the [related section](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/dev-preparation-practice-0000001073320959?ha_source=hms1).\n\n## Preparations\n1.\tRegister as a Huawei developer.\n2.\tCreate an app and start APIs.\n3.\tImport your demo project to Android Studio (Chipmunk | 2021.2.1) or later. Download the **agconnect-services.json** file of the app from AppGallery Connect, and add the file to the app-level directory (java language is '/javaapp/', kotlin language is '/KotlinApp/') of your project. Generate a signing certificate fingerprint, add the certificate file to your project, and add the configuration to the *build.gradle* file. For details, please refer to the [integration preparations](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-config-agc-0000001050170137?ha_source=hms1).\n\n\n## Installation\nTo use the functions provided in the sample code, install HMS Core (APK) 4.0 on your phone in one of the following methods:\nMethod 1: Compile and build the APK in Android Studio. Then, install the APK on your phone and debug it.\nMethod 2: Generate the APK in Android Studio. Use the Android Debug Bridge (ADB) tool to run the **adb install {*YourPath/YourApp.apk*}** command to install the APK on your phone and debug it.\n\n## Environment Requirements\nAndroid targetSdkVersion 33 or later and JDK 1.8.211 or later are recommended.\n\n## Hardware Requirements\nA computer (desktop or laptop) running Windows 10 or Windows 7\nA Huawei phone with a USB data cable, which is used for debugging\n\n## Technical Support\nYou can visit the [Reddit community](https://www.reddit.com/r/HuaweiDevelopers/) to obtain the latest information about HMS Core and communicate with other developers.\n\nIf you have any questions about the sample code, try the following:\n- Visit [Stack Overflow](https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Votes), submit your questions, and tag them with `huawei-mobile-services`. Huawei experts will answer your questions.\n- Visit the HMS Core section in the [HUAWEI Developer Forum](https://forums.developer.huawei.com/forumPortal/en/home?fid=0101187876626530001?ha_source=hms1) and communicate with other developers.\n\nIf you encounter any issues when using the sample code, submit your [issues](https://github.com/HMS-Core/hms-push-clientdemo-android/issues) or submit a [pull request](https://github.com/HMS-Core/hms-push-clientdemo-android/pulls).\n\n## License\nThe sample code is licensed under [Apache License 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-push-clientdemo-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhms-core%2Fhms-push-clientdemo-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhms-core%2Fhms-push-clientdemo-android/lists"}