2

This is the code for the intent:

Intent emailIntent = new Intent();
emailIntent.setAction(Intent.ACTION_SEND);
emailIntent.putExtra(Intent.EXTRA_TEXT, text);
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
emailIntent.setType("message/rfc822");
Intent openInChooser = Intent.createChooser(emailIntent,resources.getString(R.string.app_name));
startActivity(openInChooser);

In Samsung phones the chooser only shows the native email apps but not the ones that have been installed from the play store. Is there something else I need to add?

  • Are you sure that the email apps that you installed support this particular `Intent` structure? – CommonsWare Oct 19 '16 at 23:14
  • Yes, one of the apps I installed is Outlook. In other phones (Nexus, Oneplus) the chooser shows the option but not in a Samsung phone – Leonardo Madrigal Oct 19 '16 at 23:21
  • You might try calling `queryIntentActivities()` on `PackageManager`, with this `Intent`, and see if Outlook shows up as a candidate activity. If it does, then Samsung screwed with the system chooser. – CommonsWare Oct 19 '16 at 23:24
  • Yes, the outlook app is shown in the result. – Leonardo Madrigal Oct 19 '16 at 23:40
  • :: shrug :: You could try removing `createChooser()`, and just invoking `emailIntent` directly, to see if it is the manually-requested chooser that somehow is the problem. But otherwise I don't know how you would get Samsung to stop filtering Outlook out of the chooser. – CommonsWare Oct 19 '16 at 23:42
  • By invoking `emailIntent` directly the default email app is launched, no chooser to select another app :( – Leonardo Madrigal Oct 20 '16 at 00:00

0 Answers0