Content Type for zip file as email Attachment

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Content Type for zip file as email Attachment

Postby rapidrocks » Mon Sep 21, 2009 11:53 am

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
AndroidRocks
rapidrocks
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jun 30, 2009 9:52 am
Location: India

Top

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest