【发布时间】:2014-05-09 02:30:14
【问题描述】:
我正在尝试启动Play Store,以便当用户在下拉菜单中单击Rate Us 时,它将在谷歌市场中加载我的应用程序。到目前为止,当用户点击菜单中的Rate Us 时,应用程序什么也不做,logcat 中也没有任何信息。
public boolean onOptionsItemSelected(MenuItem item){
switch(item.getItemId()){
case R.id.About:
Intent i = new Intent(this, About.class);
startActivity(i);
break;
case R.id.exit:
finish();
break;
case R.id.Rate:
Intent marketIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?
id="+"com.androidsleepmachine.gamble"));
startActivity(marketIntent);
}
return false;
}
我需要的是,当用户在膨胀的菜单上单击“评分”时,它会将我的应用加载到市场中,以便他们添加评分。 Logcat 说没有活动来处理意图。
【问题讨论】:
标签: android eclipse android-intent