In many applications there is such a button, inform the developers on the screen displays applications working with e-mail how to do this? Something like this

1 answer 1

Here is an example of displaying email-specific applications:

Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); String title = getResources().getString(R.string.choose_dialog_title); Intent chooser = Intent.createChooser(intent, title); if (intent.resolveActivity(getPackageManager()) != null) { startActivity(chooser); } 
  • add nothing to the project - Grohovac
  • @Zlatan, what if I replace Intent.ACTION_SENDTO with Intent.ACTION_SEND ? - Ksenia
  • Everything is exactly Nothing - Grohovac
  • @Zlatan, it’s also possible that you don’t have mail- ACTION_SEND devices on your phone - try replacing ACTION_SEND with ACTION_DIAL - should show dialing applications, it should be exactly on the phone - Ksenia
  • The room opens, there is gmail and Email. Applications - Grohovac