Send email with attachments - changes between ICS and JB?

I use the following code to send emails with multiple attachments using M4A (should be easily portable in Java):

Intent intent = new Intent(Intent.ActionSendMultiple); intent.SetType("text/plain"); intent.PutExtra(Intent.ExtraText, "Mail body"); intent.PutExtra(Intent.ExtraSubject, "Mail subject"); DirectoryInfo di = new DirectoryInfo(Android.App.Application.Context.FilesDir.AbsolutePath); List<Android.Net.Uri> fileList = new List<Android.Net.Uri>(); foreach (FileInfo file in di.GetFiles("MyAppLogFile*")) { Java.IO.File myFile = new Java.IO.File(file.FullName); var uri = Android.Net.Uri.FromFile(myFile); fileList.Add(uri); } if (fileList.Count > 0) intent.PutParcelableArrayListExtra(Intent.ExtraStream, fileList.ToArray()); StartActivity(Intent.CreateChooser(intent, "Send email")); 

This works fine on ICS devices, but on Bean Jelly, the email program still shows attachments, but they are not sent. Since the files come from the protected part of the file system belonging to the application, I suspect that something can be changed using the permission system from ICS (tested on Galaxy S3) and JB (tried on Galaxy S3 and Galaxy Nexus - the latter works JB 4.2 )

Did anyone succeed in sending emails with attachments to JB, where the files to be sent are located in the application directory or in its subdirectory?

Thanks Stephan

+4
source share

All Articles