无法提供评级功能

时间:2013-03-06 12:46:14

标签: android google-play

我正在尝试在我的应用中提供评分功能,但是当我点击rate时,它会说“未找到请求的项目”。

1 个答案:

答案 0 :(得分:1)

尝试使用此代码

    private void rateAppOnPlayStore() {
    Uri uri = Uri.parse("market://details?id=" + getPackageName());
    Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);
    try {
        startActivity(myAppLinkToMarket);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(this, "Unable to find google play app.",
                Toast.LENGTH_LONG).show();
    }
}

这也适用于Market app。