Opening email client via Intent (but not to send a message)

后端 未结 4 2100
挽巷
挽巷 2020-12-15 04:52

Is there a way to programically open email client, without a need to forcing message send? I just want the app to let user open his email client for email checking purposes

4条回答
  •  旧时难觅i
    2020-12-15 05:22

        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.addCategory(Intent.CATEGORY_APP_EMAIL);
        startActivity(intent);  
        startActivity(Intent.createChooser(intent, getString(R.string.ChoseEmailClient)));
    

    That kinda worked. But it opend Gmail for me, even since I have other email clients

提交回复
热议问题