Where does the gmail app save the previewed files? I had previewed a pdf attachment from an email recently. I deleted the email permanently without downloading the attachment. I want to retrive the previewed file if possible. Is there a specific place the previewed files are stored in? Thanks!
Gmail app stores those previewed files under its data directory. The file location would be /data/data/com.google.android.gm/cache/&lt;YOUR_EMAIL_ID&gt;/&lt;ATTACHMENT_NAME&gt;. 

It seems that Gmail app doesn't have an in-built preview functionality so it gives the option to choose an installed app to open that file. If you did that then very likely, your file was also saved in the cache of that app. So now, there are at least two locations to get hold of that file.

E.g. WPS Office would have cached the file at /sdcard/Android/data/cn.wps.moffice_eng/.cache/KingsoftOffice/file/download/&lt;ALPHA-NUMERIC-NAME&gt;/&lt;ATTACHMENT_NAME&gt;.

Inbox by Gmail  app also saves the previewed file in its data directory. The file location is /data/data/com/google.android.apps.inbox/files/downloads/&lt;ALPHA-NUMERIC-NAME&gt;/attachments/&lt;ALPHA-NUMERIC-NAME&gt;/&lt;ATTACHMENT_NAME&gt;.

Inbox by Gmail doesn't allow adb backup so you most likely can't get your hands on that file if the device is not rooted.

Gmail app does allow backup but I couldn't get a working backup file for some reason, so you're on your own about it.