0

我创建了一个警报对话框,当用户第一次点击我的应用程序时显示,我想知道的是如何将应用程序定向到我在 Play 商店中的应用程序并保存选择的内容,以便该框不会再次出现. 请帮忙,谢谢!

AlertDialog.Builder b=  new  AlertDialog.Builder(this)
                .setTitle("Review and Rate Converjz!")
                .setMessage("Click on OK to review and rate Converjz, your feedback" +
                        "and ratings are greatly apreciated! We need your help to improve our app in order to provide you with a better" +
                                " experience. Thanks!")
                .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int whichButton) {
                            dialog.dismiss();


                            }


                        }
                )
                .setNegativeButton("CANCEL",
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int whichButton) {
                                dialog.dismiss();
                               dialog.cancel();
                            }
                        }
                );
        b.show();
4

2 回答 2

1

以下是在 Play 商店中链接到您的应用的方法:

Uri uri = Uri.parse("market://details?id=" + getPackageName());
Intent openPlayStore = new Intent(Intent.ACTION_VIEW, uri);
try {
   startActivity(openPlayStore);
} catch (ActivityNotFoundException e) {
    Toast.makeText(mActivity, " unable to find market app",   Toast.LENGTH_LONG).show();
}

您无法保存用户评分或他评分的内容,但您可以在 SharedPreferences 中保存您要求评分的内容

于 2016-01-13T15:37:57.280 回答
0

您可以使用自己的链接打开 Play 商店链接并将该用户操作信息保存在 Shared Preference 中。但开发人员之间的共同要求因此使用以下库 -

https://github.com/fernandodev/easy-rating-dialog

https://github.com/hotchemi/Android-Rate

希望能解决问题。

于 2016-01-13T15:35:34.967 回答