使用应用程序在市场评分应用程序、评分、市场

2023-09-12 23:57:06 作者:浅浅旳笑

我目前正在开发在哪里,我想给一些功能,用户评价当前的应用程序在Android中的应用程序。     他们将是一个按钮,它的点击它会问询问用户是否要进行评分的应用程序或没有?如果是将将进入市场应用上的设备进行评分的应用程序 (市场应该显示这个应用程序。),否则将打开浏览器,将加载市场和放大器;示出本申请中。     任何一个之前使用这种功能。请提供一些帮助。

I am currently developing an application in Android Where I want to give some functionality to user to rate the current application. Their will be a button on it's click it will ask ask whether user want to rate the application or not? If yes will will go to market application on device to rate application (Market should show this application.) or it will open browser which will load market & showing this application. Any one used this kind of functionality before. Please provide some help.

感谢你。

推荐答案

我总是用这样一个方法:

I always use a method like this one:

private void launchMarket() {
    Uri uri = Uri.parse("market://details?id=" + getPackageName());
    Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
    try {
        startActivity(goToMarket);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(this, R.string.couldnt_launch_market, Toast.LENGTH_LONG).show();
    }
}