{"id":25872744,"url":"https://github.com/waitaction/cordova-plugin-xiaomi-push","last_synced_at":"2026-05-11T11:36:40.952Z","repository":{"id":57209240,"uuid":"312145658","full_name":"waitaction/cordova-plugin-xiaomi-push","owner":"waitaction","description":"小米推送","archived":false,"fork":false,"pushed_at":"2020-11-12T08:41:47.000Z","size":610,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T02:52:38.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waitaction.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T02:26:52.000Z","updated_at":"2023-06-14T06:18:10.000Z","dependencies_parsed_at":"2022-08-26T17:40:47.486Z","dependency_job_id":null,"html_url":"https://github.com/waitaction/cordova-plugin-xiaomi-push","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waitaction/cordova-plugin-xiaomi-push","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitaction%2Fcordova-plugin-xiaomi-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitaction%2Fcordova-plugin-xiaomi-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitaction%2Fcordova-plugin-xiaomi-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitaction%2Fcordova-plugin-xiaomi-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waitaction","download_url":"https://codeload.github.com/waitaction/cordova-plugin-xiaomi-push/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitaction%2Fcordova-plugin-xiaomi-push/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32893746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-03-02T08:22:20.722Z","updated_at":"2026-05-11T11:36:40.928Z","avatar_url":"https://github.com/waitaction.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":" # 小米手机推送\n\n小米手机推送\n\n安装 `cordova-plugin-xiaomi-push`\n \n\n``` shell\n cordova plugin add cordova-plugin-xiaomi-push --variable  APP_KEY=YOUR_APP_KEY --variable APP_ID=YOUR_APP_ID\n```\n\n## 使用\n\n使用前需注册，以获取 `token` ，你可以将 `token` 与你的app用户信息关联后上传到服务器\n\n``` js\n// 注册推送\nxiaomiPush.register(function(token) {\n    console.log(token);\n}, function(err) {\n    console.log(err);\n}, []);\n\n// 接收token\nxiaomiPush.onNewToken(function(token) {\n    console.log(token); // 会多次接收到token\n});\n```\n\n注册完成后，需要监听 `messageReceived` 事件\n\n``` js\ndocument.addEventListener(\"messageReceived\", function(result) {\n    console.log(result);\n}, false);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaitaction%2Fcordova-plugin-xiaomi-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaitaction%2Fcordova-plugin-xiaomi-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaitaction%2Fcordova-plugin-xiaomi-push/lists"}