edw*_*ard 25
我不确定这个应用程序如何使用"发送反馈".你可以向我解释一下,所以我不必下载应用程序吗?
由于我不知道它是什么样的,我只是想猜一下让你用一种方式让用户发送反馈:
@Override
public boolean onCreateOptionsMenu(Menu menu){
super.onCreateOptionsMenu(menu);
MenuInflater hardwaremenu = getMenuInflater();
hardwaremenu.inflate(R.menu.main_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()){
case R.id.sendEmail:
Intent Email = new Intent(Intent.ACTION_SEND);
Email.setType("text/email");
Email.putExtra(Intent.EXTRA_EMAIL, new String[] { "admin@hotmail.com" });
Email.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
Email.putExtra(Intent.EXTRA_TEXT, "Dear ...," + "");
startActivity(Intent.createChooser(Email, "Send Feedback:"));
return true;
}
}
Run Code Online (Sandbox Code Playgroud)
将其合并到现有菜单中,或者只是将其添加到要显示菜单的活动底部.
我希望这有帮助!
小智 8
如果你真的想抓住任何未处理的例外情况并将其作为错误报告提交到您自己的网站或Google Docs电子表格,您应该查看ACRA(https://github.com/ACRA/acra/).在向您发送Bugreport之前,它可以选择向用户询问书面反馈.
| 归档时间: |
|
| 查看次数: |
21415 次 |
| 最近记录: |