首页 > 解决方案 > 在 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.
                }
            }
        });

标签: javaandroidgoogle-play-console

解决方案


推荐阅读