Quantcast
Channel: Unable to programmatically attach file to an email intent using a FileProvider - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Louis CAD for Unable to programmatically attach file to an email...

If you also add it as ClipData, the permission grant will work successfully:yourIntent.clipData = ClipData.newUri(context.contentResolver, fileName, contentUri)The culprit is that...

View Article


Answer by Lucacel Razvan Cristian for Unable to programmatically attach file...

for me it worked after I cast createNewFile// Build the attachment URIFile attachFile = new File(aDirectory, aFileName);attachFile.createNewFile();

View Article


Answer by HaimS for Unable to programmatically attach file to an email intent...

Looks like gmail can't find the file you are trying to attach.It says: "FileNotFoundException when openAssetFileDescriptor"Make sure the file created here has a valid path to an existing file.File...

View Article

Unable to programmatically attach file to an email intent using a FileProvider

I'm creating an email intent and attaching a file (using a FileProvider) but the Gmail client reports "impossible to attach the file". I had this working previously but it's now broken. I didn't change...

View Article
Browsing latest articles
Browse All 4 View Live


Latest Images