Anyone please help me to solve this issue,
I want to send a mail with a zip file as attachment. I am able to create zip file and set the content type as "application/zip". But I am getting a message saying "No applications can perform this action"
When I set the content type as "image/*" . It is opening the mail compose window with zip file as attachment, but the mail is not sending.
Pls find below the code I am using,
Intent sendIntent = new Intent(Intent.ACTION_SEND);
String subject = getResources().getString(R.string.emailSubject);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
String messageBody = "Body comes here";
sendIntent.putExtra(Intent.EXTRA_TEXT, messageBody);
Uri uri = Uri.parse("file://"+filesDirPath+"/MYZIPFILE.zip");
sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
sendIntent.setType("application/zip");
startActivity(Intent.createChooser(sendIntent, getText(R.string.app_name)));
Please help me