Ana*_*ria 3 android google-play huawei-mobile-services appgallery
我知道如何为 Google Play 商店做到这一点(在这里回答),但我没有找到 AppGallery 的方法。谢谢你!
更新#1
使用下面的答案,我通过以下步骤部分解决了这个问题:
查询应用程序信息的响应有很多有关应用程序的信息,包括“versionNumber”,但对我来说,它不提供“versionNumber”(我需要的单个信息),因为此参数是可选的。现在我又陷入困境了,因为我不明白我需要改变什么才能收到这个。
如果有人知道我该如何解决这个问题,非常感谢您的帮助。
更新#2
@shirley 的评论是正确的。该问题已在最新版本中修复,并已于本月发布。
您可以调用查询应用信息接口(GET方式)查询应用详情\xef\xbc\x9a
\npublic static void getAppInfo(String domain, String clientId, String token, String appId, String lang) {\n HttpGet get = new HttpGet(domain + "/publish/v2/app-info?appid=" + appId + "&lang=" + lang);\n get.setHeader("Authorization", "Bearer " + token);\n get.setHeader("client_id", clientId);\n try {\n CloseableHttpClient httpClient = HttpClients.createDefault();\n CloseableHttpResponse httpResponse = httpClient.execute(get);\n int statusCode = httpResponse.getStatusLine().getStatusCode();\n if (statusCode == HttpStatus.SC_OK) {\n BufferedReader br =\n new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent(), Consts.UTF_8));\n String result = br.readLine();\n // Object returned by the app information query API, which can be received using the AppInfo object. For details, please refer to the API reference.\n JSONObject object = JSON.parseObject(result);\n System.out.println(object.get("ret"));\n }\n } catch (Exception e) {\n }\n }\nRun Code Online (Sandbox Code Playgroud)\n\n
| 归档时间: |
|
| 查看次数: |
1695 次 |
| 最近记录: |