I have to retrieve the file path of the content from gmail app. I get content uri similar to:
content://gmail-ls/messages/mymailid%40gmail.com/4/attachments/0.1/BEST/false
I tried queried for the contents but I get only two columns the title and the size. I want to get the file path.
Kindly help regarding this.
I think you cannot retrieve the file path directly, as the attachment is stored on Google servers. You can, however, access the file data using ContentResolver and InputStream, and copy the attachment's data to your storage.
Inspired by CarvingCode blog, I use this snippet: