Goal: View pdf from OneDrive with Samsung notes (copy to asd). Android 11..
First APK test by copy file (TestviaAssset) from asset to asd, file opens via Samsung notes.
Second APK (see blocks, disabled copy from asset) by download file to asd from OneDrive gives error when Samsung notes viewer opens. Error (translation) “file cannot be opened. Possibly not supported or damaged”.
Generated URL from OneDrive via “copy link” and copied in url block “DownloadToASD1”.DownloadFileToASD”.
Listing the asd shows the file “Testvia1D”.
I tested the OneDrive URL link outside APK….document opens.
Remark: file via asset and OneDrive have same origin file.
Question 1: Can OneDrive pdf file be downloaded with extension “DownloadToASD1” with URL by “copy link” methodology ?
Question 2: Any other possible cause for error ?
Thanks already.
Usually another app (here the pdf reader) is not able to access the ASD of another app (in this case your app), so I'm wondering that this worked for you...
EDIT: probably the Samsung notes reader on Samsung devices does have more permissions?
Viewing the pdf file from shared storage should work
Hi Taifun, thanks for quick response. I added a block “When DownloadToASD1.DownloadCompleted”. I checked in Documents..file is there, but same error. The original pdf size was 700k, in documents however 49k ? Does “DownlloadToASD” cause this ?
Thank you for your advise, this works . I can now find the way ( OneDrive folder link+filename) to copy 30 pdf’s with the great DownloadToAsd extension.
I see in upwards response the advise to copy the pdf files from asd to shared folder and start then the startactivity with Samsung notes. Is this more/better future proof ?
You are correct. I only used this code to check if download url from OneDrive worked (It worked). The other blocks are out of function. Sorry if I caused any misunderstanding. So all solved for me. Thanks.