java - 在 android 移动应用程序中测试应用内评论
问题描述
我已经在我的 android 应用程序中实现了 Google Play In-App Review。但不了解如何测试它。我已经浏览了它写在那里的谷歌 API 文档,您可以通过内部应用程序共享进行测试。但是,当我在 Google Play 控制台内部应用程序共享中上传我签名的 .abb 或 .apk 文件时,会出现如下错误:您无权将内部应用程序共享用于.....包名称。
以下是我为应用内审查添加的代码。请同时检查:
final ReviewManager manager = ReviewManagerFactory.create(this);
Task<ReviewInfo> request = manager.requestReviewFlow();
request.addOnCompleteListener(new OnCompleteListener<ReviewInfo>() {
@Override
public void onComplete(@NonNull Task<ReviewInfo> task) {
if (task.isSuccessful()) {
// We can get the ReviewInfo object
ReviewInfo reviewInfo = task.getResult();
Task<Void> flow = manager.launchReviewFlow(dashboardActivity.this, reviewInfo);
flow.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
// The flow has finished. The API does not indicate whether the user
// reviewed or not, or even whether the review dialog was shown. Thus, no
// matter the result, we continue our app flow.
}
});
} else {
// There was some problem, continue regardless of the result.
}
}
});
解决方案
推荐阅读
- azure-functions - Azure 功能:无法加载 DLL 认知语音 dll
- powershell - 使用 PowerShell 在没有备用数据流的情况下搜索数据的小问题
- azure - 如何在 Azure 上部署一个 Sping Restfull api
- ruby-on-rails - 导轨。将单个用户的角色切换为买家/卖家,如 Fiverr
- android - Android 应用程序从 Delphi 10.3.1 迁移到 10.3.2
- node.js - 如何将超级代理(或任何请求库)安装到无服务器框架 AWS Lambda 函数中?
- javascript - Angular 8在页面加载错误后添加类:ExpressionChangedAfterItHasBeenCheckedError
- pointers - 在 ARM 汇编中,为什么我的值没有更新?
- c# - 无法在 Visual Studio 2017 上运行 Xunit 单元测试
- angular - 如何杀死Angular中的组件?