Android

How to send zip file as attach in email client

Posted on

Hi Guys, When I’m trying to attach zip file to a mail composer. I tried following code //this is a String variable used for file path. String STORAGE_ZIP_FILE=Environment.getExternalStorageDirectory().getPath() + “/MyProj/test.zip”; Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_SUBJECT, “Person Details”); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(STORAGE_ZIP_FILE)); sendIntent.setType(“text/html”); startActivity(sendIntent); But, I see runtime error as it displayed a toast message saying this […]