【问题标题】:How to include feedback in android app [closed]如何在android应用程序中包含反馈[关闭]
【发布时间】:2014-01-14 07:01:00
【问题描述】:

我想在我的应用程序中包含反馈..所以我需要显示一个弹出窗口来发送邮件并且..我需要输入我的邮件 ID 和反馈,当我点击弹出窗口中的发送按钮时,邮件必须发送到预定义的邮件ID..怎么可能???

【问题讨论】:

    标签: java android feedback


    【解决方案1】:

    这就是你在 android 中实现反馈的方式:

    Intent feedbackEmail = new Intent(Intent.ACTION_SEND);
    
    feedbackEmail.setType("text/email");
    feedbackEmail.putExtra(Intent.EXTRA_EMAIL, new String[] {"yourfeedbackreceiveemailid"});
    feedbackEmail.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
    startActivity(Intent.createChooser(feedbackEmail, "Send Feedback:"));
    

    【讨论】:

    • @ptm 如果你得到你的答案,请投票给我的答案。
    【解决方案2】:

    听起来您正在寻找电子邮件意图。这里有几个链接可以帮助你!

    Send Email Intent

    end email via gmail

    【讨论】:

      【解决方案3】:

      此代码确实有效。将此代码放在按钮单击(反馈)上

       private void sendEmail() {
                      File photo = new File("sdcard/Video Tell Images/" + ViewVideo.saved_image_name);
                      Uri imageuri = Uri.fromFile(photo);
                      Intent send_report = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                      "mailto", "youremail@example.com", null));
      
                  send_report.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");
                  send_report.putExtra(Intent.EXTRA_TEXT, "View my image");
                  send_report.setType("text/plain");
                  startActivity(send_report);
      
              }
      

      【讨论】:

        【解决方案4】:

        以下内容对我来说很好。

          public static void writeReviewMail(Context context) {
                Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                        "mailto", "youremail@example.com", null));
                emailIntent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.yoursubject));
                context.startActivity(Intent.createChooser(emailIntent, context.getString(R.string.contact_us)));
            }
        

        它让用户选择他的电子邮件应用程序并插入收件人以及电子邮件的主题。 这可能在模拟器中不起作用,但它适用于我迄今为止测试过的所有真实设备。 [2.1 - 4.4]

        【讨论】:

        • 这也是我所做的。它在模拟器中不起作用,因为它缺少可供选择的电子邮件应用程序。
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-08-13
        相关资源
        最近更新 更多