Bug 488809

Summary: permission error when trying to open file sent to Android from the notification
Product: [Applications] kdeconnect Reporter: Adam Fontenot <adam.m.fontenot+kde>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: normal CC: andrew.g.r.holmes
Priority: NOR    
Version First Reported In: 24.05.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Adam Fontenot 2024-06-20 17:59:11 UTC
SUMMARY

I can send a file to Android from my Linux computer using KDE Connect, and it works fine - saves in Internal > Download > KDEConnect. Navigating to this directory using a file manager app and opening it directly works as expected.

When the file is received by Android, a notification appears. Clicking on this notification launches an "open with" dialog, but no matter which application I select, it is unable to open the file.

STEPS TO REPRODUCE
1. Send any file (I used a PDF) to Android from KDE Connect.
2. Try to open the file by clicking on the notification. (For this I tried using "Simple File Manager", Firefox, etc.)

OBSERVED RESULT

Doesn't open. Simple File Manager shows a toast with the following message:

Error: Permission Denial: reading com.android.externalstorage.ExternalSto...

Note that using the same application to open the file directly works fine. The error seems to be a storage permission issue, but ironically this app has the "manage all files" permission, so this shouldn't be an issue.

Trying to use Firefox helpfully shows a URL in the location bar, which I've copied here:

content://com.android.externalstorage.documents/tree/primary%3ADownload%2FKDEConnect/document/primary%3ADownload%2FKDEConnect%2FOnline%20Booking%20(4).pdf

I don't know enough about Android to say whether opening this URL with an app should work or not.

EXPECTED RESULT

The file loads in the app I choose.

SOFTWARE/OS VERSIONS

Linux application version: 24.05.0
Android application version: 1.30.1 (fdroid)
Android version: 12 (vanilla Samsung ROM, Google Play system update 2024-05-01)