Android open mail client

后端 未结 2 574
借酒劲吻你
借酒劲吻你 2021-01-13 04:57

How can I open mail client from my app, NOT SENDING EMAIL just open the inbox? when I use

Intent intent = new Intent(Intent.ACTION_VIEW);
        Uri data =         


        
相关标签:
2条回答
  • 2021-01-13 05:33

    You can just use in your xml, like this:

    android:autoLink="email"
    
    0 讨论(0)
  • 2021-01-13 05:37

    From @CommonsWare answer

    This is what worked for me:

    Intent intent=Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_EMAIL);
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//Min SDK 15
                startActivity(intent); 
    
    0 讨论(0)
提交回复
热议问题