How to make button open

后端 未结 1 729
时光说笑
时光说笑 2021-01-29 10:51

I have a problem, I need my \'Send\' button to send the email to my button when the user clicks on it. I just want to get where, when users click send Button then the button wil

相关标签:
1条回答
  • 2021-01-29 11:23
    Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                "mailto","email@email.com", null));
    intent.putExtra(Intent.EXTRA_SUBJECT, subject);
    intent.putExtra(Intent.EXTRA_TEXT, message);
    startActivity(Intent.createChooser(intent, "Choose an Email client :"));
    

    USe thi. Change the values as per your need

    0 讨论(0)
提交回复
热议问题