Android - Opening the email application?

后端 未结 4 1787
时光说笑
时光说笑 2021-02-01 13:47

I want to open the email application on my android app: The following code crashes Am I doing anything wrong? please provide code

Intent i = new Intent (Intent.A         


        
4条回答
  •  灰色年华
    2021-02-01 14:09

    Try This :

        Intent intent = new Intent(Intent.ACTION_VIEW);
        Uri data = Uri.parse("mailto:"
                + "xyz@abc.com"
                + "?subject=" + "Feedback" + "&body=" + "");
        intent.setData(data);
        startActivity(intent);
    

提交回复
热议问题