Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot attach a file to GMail for Android with Xamarin.forms

See original GitHub issue


I use the SimpleLogger plugin to create log files. Files are created in the /data/user/0/[PACKAGE_NAME]/files/.config/[NAME].log directory

So I added the following paths in file file_paths.xml: <files-path name = "internal_files" path = "." />

I know that my configuration is supported because if I remove this path, I get an error of type: Failed to find configured root which contains /data/data/com.agilitic.kibati/files/.config/kibati_log1. log

But when I want to send an email, Gmail tells me the following error: Permission denied for the attachment

I tried in PCL and Android.

I am using version 5.0.0 of the plugin, and my Android project use the target API26

Do I forget a setting?


Best Regards


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

cjlotzcommented, Feb 20, 2018

@lanarchyste did you try <files-path name = "internal_files" path = ".config/" />

cjlotzcommented, Apr 2, 2018

I’ve created a separate issue to rework the sample logic using a content provider at a later stage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

On Android 11, intent to Gmail not attaching file. Says “ ...
My Xamarin Forms project is calling an intent to send a pdf. This is my code: public void OpenShareIntent(string filePath)
Read more >
Attaching a file to email through Xamarin android app with ...
This feature enables an app to email files in email clients on the device. Xamarin.Essentials will automatically detect the file type (MIME) ...
Read more >
Unable to attach file to Gmail app from my app in Android 11
I have a logs file that is attached to an email client app when a user wants to contact our support team from...
Read more >
Work Profile Gmail Can't Attach Files
I can' attach files in my work profile gmail account. Whenever I touch the clip to attach file, it does not go to...
Read more >
Store Data in Google Sheets using Xamarin iOS & Android
Open Visual Studio and Create a new solution from a “Blank Forms App” template, targeting iOS & Android platforms. Update the MainPage.xaml file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found