Using Android Intent.ACTION_SEND for sending email

前端 未结 17 1295
野趣味
野趣味 2020-11-29 23:07

I\'m using Intent.ACTION_SEND to send an email. However, when I call the intent it is showing choices to send a message, send an email, and also to

17条回答
  •  佛祖请我去吃肉
    2020-11-29 23:56

    First solution: try to be more specific in your Intent parameters. Add a message recipient for instance

    emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"user@example.com"});
    

    Second solution: use the package manager to find all applications capable of sending a message and select the only those you want to use.

提交回复
热议问题