如何在 Android 中实现“发送反馈”功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11320685/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to implement "Send Feedback" feature in Android?
提问by oracleicom
I would like this to behave just like the "Send Feedback" behaves when you click on the Menu item in the Google+ Android app.
我希望这就像单击 Google+ Android 应用程序中的菜单项时“发送反馈”的行为一样。
采纳答案by edwoollard
I'm not exactly sure how this app behaves with the "Send Feedback". Could you explain it to me, so I do not have to download the app?
我不确定这个应用程序如何处理“发送反馈”。你能向我解释一下,这样我就不必下载应用程序了吗?
As I do not know what it looks like, I am just going to take a guess and supply you with one way of letting the user send feedback:
由于我不知道它是什么样子,我只是猜测一下,并为您提供一种让用户发送反馈的方法:
@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[] { "[email protected]" });
Email.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
Email.putExtra(Intent.EXTRA_TEXT, "Dear ...," + "");
startActivity(Intent.createChooser(Email, "Send Feedback:"));
return true;
}
}
Either incorporate this into your existing menu or simply add this onto the bottom of the Activity that you would like to display the menu.
要么将其合并到您现有的菜单中,要么简单地将其添加到您想要显示菜单的活动的底部。
I hope this helps!
我希望这有帮助!
回答by mauimauer
If you really want to catch any unhandled Exceptions and submit them as Bug Reports to your own Site or a Google Docs Spreadsheet youu should have a look at ACRA (https://github.com/ACRA/acra/). It has an option to ask the user for written feedback before sending the Bugreport to you.
如果您真的想捕获任何未处理的异常并将它们作为错误报告提交到您自己的站点或 Google 文档电子表格,您应该查看 ACRA ( https://github.com/ACRA/acra/)。它可以选择在向您发送错误报告之前要求用户提供书面反馈。
回答by Iraklis
Disclaimer: It's my own project
免责声明:这是我自己的项目
I'm currently working on this: http://www.android-feedback.comwhich ,I think, is what you are looking for. If you want to participate in the beta just leave your e-mail addr on the form.
我目前正在研究这个:http: //www.android-feedback.com,我认为这就是你正在寻找的。如果您想参与测试,只需在表格上留下您的电子邮件地址即可。