Problems attaching a file to an email intent in Android.
I know this question has been asked in several variations before, but my question revolves more around the setType method.

I am trying to attach an XML file to an email that I am starting with an Intent. The code is:

    File exportPath = (File) data.getExtras().getSerializable("Path");
    Log.w(TAG, Uri.fromFile(exportPath).toString());
    Intent email = new Intent();
    email.setType("application/xml");
    email.putExtra(Intent.EXTRA_EMAIL, new String[] {user_email});
    email.putExtra(Intent.EXTRA_SUBJECT, "Test");
    email.putExtra(Intent.EXTRA_TEXT, "Text");
    email.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(exportPath));
			
    startActivity(Intent.createChooser(email, "Mail job"));

I think my problem is that I am setting the type incorrectly, but I am unable to find the correct type for XML files. Anyone have any ideas?
Problems attaching a file to an email intent in Android.
===

I know this question has been asked in several variations before, but my question revolves more around the setType method.

I am trying to attach an XML file to an email that I am starting with an Intent. The code is:

    File exportPath = (File) data.getExtras().getSerializable("Path");
    Log.w(TAG, Uri.fromFile(exportPath).toString());
    Intent email = new Intent();
    email.setType("application/xml");
    email.putExtra(Intent.EXTRA_EMAIL, new String[] {user_email});
    email.putExtra(Intent.EXTRA_SUBJECT, "Test");
    email.putExtra(Intent.EXTRA_TEXT, "Text");
    email.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(exportPath));
			
    startActivity(Intent.createChooser(email, "Mail job"));

I think my problem is that I am setting the type incorrectly, but I am unable to find the correct type for XML files. Anyone have any ideas?