How to open the default mail inbox from android code?

前端 未结 9 1641
执念已碎
执念已碎 2021-02-19 00:43

I\'m trying to link a button to the mail app. Not to send mail, but just to open the inbox.

Should I do this with Intent intent = new Intent(...)?

9条回答
  •  梦谈多话
    2021-02-19 00:46

      You can use this but it is for gmail only
    
      Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);  
      emailIntent.setType("plain/text");
      startActivity(emailIntent); 
    

提交回复
热议问题