{"id":17069390,"url":"https://github.com/nukc/appmarketupdater","last_synced_at":"2026-04-18T01:03:10.658Z","repository":{"id":149848985,"uuid":"114705937","full_name":"nukc/AppMarketUpdater","owner":"nukc","description":"update app through app market","archived":false,"fork":false,"pushed_at":"2017-12-19T08:57:10.000Z","size":161,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T10:44:28.399Z","etag":null,"topics":["app","app-market","app-store","updater"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nukc.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-19T01:41:58.000Z","updated_at":"2017-12-19T02:05:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbaacf99-4138-4d08-aa55-7b833ba2bcd2","html_url":"https://github.com/nukc/AppMarketUpdater","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nukc/AppMarketUpdater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukc%2FAppMarketUpdater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukc%2FAppMarketUpdater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukc%2FAppMarketUpdater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukc%2FAppMarketUpdater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nukc","download_url":"https://codeload.github.com/nukc/AppMarketUpdater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukc%2FAppMarketUpdater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["app","app-market","app-store","updater"],"created_at":"2024-10-14T11:26:19.532Z","updated_at":"2026-04-18T01:03:10.633Z","avatar_url":"https://github.com/nukc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppMarketUpdater\n\n通过应用市场更新 app（也就是打开指定包名的详情页面）。\n\n\u003cimg src=\"https://raw.githubusercontent.com/nukc/AppMarketUpdater/master/art/dialog.jpg\"\u003e\n\n依赖其中一个即可：\n```groovy\n    implementation 'com.github.nukc.appmarketupdater:updater:0.0.2'\n    implementation 'com.github.nukc.appmarketupdater:updater-rxjava2:0.0.2'\n    implementation 'com.github.nukc.appmarketupdater:updater-kotlin:0.0.2'\n```\n\n## 用法\n\n[Sample](https://github.com/nukc/AppMarketUpdater/blob/master/app/src/main/java/com/github/nukc/appmarketupdater/sample/MainActivity.kt)\n\n```java\n\n    AppMarketUpdater.show(context, packageName);\n```\n\n## 分析\n\n```java\n\n    private static List\u003cResolveInfo\u003e queryAppMarkets(Context context) {\n        Intent intent = new Intent();\n        intent.setAction(\"android.intent.action.MAIN\");\n        intent.addCategory(\"android.intent.category.APP_MARKET\");\n        PackageManager pm = context.getPackageManager();\n        return pm.queryIntentActivities(intent, 0);\n    }\n```\n\n通过这个方法是不能匹配到手机上所有的应用市场，为什么呢？来看下面这几个 activity 清单信息：\n\n这个是可以匹配到的。\n```xml\n        \u003cactivity\n            android:theme=\"@ref/0x7f0b00b5\"\n            android:name=\"com.xx.xx.xx.xx.MainActivity\"\n            android:configChanges=\"0x6a0\"\u003e\n\n            \u003cintent-filter\u003e\n\n                \u003caction\n                    android:name=\"android.intent.action.MAIN\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.LAUNCHER\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.MULTIWINDOW_LAUNCHER\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.APP_MARKET\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.DEFAULT\" /\u003e\n            \u003c/intent-filter\u003e\n\n            \u003cintent-filter\u003e\n\n                ......\n            \u003c/intent-filter\u003e\n\n            \u003cmeta-data\n                android:name=\"android.app.shortcuts\"\n                android:resource=\"@ref/0x7f080006\" /\u003e\n        \u003c/activity\u003e\n\n```\n\n这个是不能匹配到的。\n```xml\n\n        \u003cactivity\n            android:theme=\"@ref/0x7f0a003c\"\n            android:name=\"com.xx.activity.xxActivity\"\n            android:launchMode=\"1\"\n            android:screenOrientation=\"1\"\n            android:configChanges=\"0x4a0\"\n            android:windowSoftInputMode=\"0x10\"\u003e\n\n            \u003cintent-filter\u003e\n\n                \u003caction\n                    android:name=\"android.intent.action.MAIN\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.LAUNCHER\" /\u003e\n            \u003c/intent-filter\u003e\n\n            \u003cintent-filter\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.DEFAULT\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.APP_MARKET\" /\u003e\n            \u003c/intent-filter\u003e\n\n            \u003cintent-filter\u003e\n\n                \u003caction\n                    android:name=\"android.intent.action.VIEW\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.DEFAULT\" /\u003e\n\n                \u003cdata\n                    android:scheme=\"market\"\n                    android:host=\"details\"\n                    android:path=\"@string/0x27\" /\u003e\n            \u003c/intent-filter\u003e\n        \u003c/activity\u003e\n\n```\n\n不难发现，android.intent.category.APP_MARKET 所在的 intent-filter 是有些许不一样的，匹配不到的缺少了\nandroid.intent.action.MAIN（把 android.intent.category.APP_MARKET 放在了一个没有 action 的 intent-filter 里）\n\n之后我查看了另一个匹配不到的某手机助手：\n以前的版本能匹配到的：\n```xml\n        \u003cactivity\n            android:theme=\"@ref/0x7f0b0059\"\n            android:name=\"com.xx.LauncherActivity\"\n            android:exported=\"true\"\n            android:screenOrientation=\"1\"\n            android:alwaysRetainTaskState=\"true\"\u003e\n\n            \u003cintent-filter\u003e\n\n                \u003caction\n                    android:name=\"android.intent.action.MAIN\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.LAUNCHER\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.APP_MARKET\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.DEFAULT\" /\u003e\n            \u003c/intent-filter\u003e\n        \u003c/activity\u003e\n```\n\n新版，不能匹配到：\n```xml\n        \u003cactivity\n            android:theme=\"@ref/0x7f0b005c\"\n            android:name=\"com.xx.LauncherActivity\"\n            android:exported=\"true\"\n            android:screenOrientation=\"1\"\u003e\n\n            \u003cintent-filter\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.APP_MARKET\" /\u003e\n\n                \u003ccategory\n                    android:name=\"android.intent.category.DEFAULT\" /\u003e\n            \u003c/intent-filter\u003e\n        \u003c/activity\u003e\n```\n\n没有 action 是没有问题的，但是无法匹配到。\n\nIf the filter does not list any actions, there is nothing for an intent to match, so all intents fail the test.\nHowever, if an Intent does not specify an action, it passes the test as long as the filter contains at least one action\n\n还是直接看文档吧 [intents-filters.html#ActionTest](https://developer.android.com/guide/components/intents-filters.html#ActionTest)\n如果是开发应用市场的同学看到了，可以注意一下。\n\n\n## License\n\n    The MIT License (MIT)\n\n    Copyright (c) 2017 Nukc\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnukc%2Fappmarketupdater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnukc%2Fappmarketupdater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnukc%2Fappmarketupdater/lists"}