Quantcast
Channel: Error: Cannot attach empty file in GMAIL app using File provider - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by Simranjeet Singh for Error: Cannot attach empty file in GMAIL app using File provider

$
0
0

Send the file in URI format like this:

Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);        emailIntent.setData(Uri.parse("mailto:"));        emailIntent.setType("application/image");        emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);        emailIntent.putExtra(Intent.EXTRA_CC, CC);ArrayList<Uri> uris = new ArrayList<>();        //convert from paths to Android friendly Parcelable Uri's        uris.add(frontImageUri);        uris.add(backImageUri);        emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);startActivity(Intent.createChooser(emailIntent, "Send mail..."));

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>