Android open emailclient programmatically

后端 未结 5 949
小鲜肉
小鲜肉 2020-12-10 12:57

Is it possible to open an emailclient such as gmail when I click a button in my app?

5条回答
  •  甜味超标
    2020-12-10 13:14

    This Worked fine for me

    Intent shareIntent = new Intent(Intent.ACTION_SEND);
                    shareIntent.setType("text/plain");
                    shareIntent.putExtra(Intent.EXTRA_EMAIL,new String[]{"mobiz@gmail.com"} );
                    shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Feedback/Support: Speech to text App");
                    startActivity(Intent.createChooser(shareIntent, "Share "));
    

提交回复
热议问题