为Android应用程序添加Rate功能
为Android应用程序添加Rate功能
为Android应用程序添加Rate功能- 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, "Could not connect the Play",
- Toast.LENGTH_LONG).show();
- }
- }
可以使用这个函数进入Google play中对应用程序进行评分,很简单,但是很实用
更多Android相关信息见Android 专题页面 http://www.bkjia.com/topicnews.aspx?tid=11
评论暂时关闭