Error locking content://com.android.providers.media.documents/document!
FileRequest() Not Working on Android
FileRequest() Not Working on Android
Using the new Hollywood Player (11) for Android, the new file requester looks great! However, I get the following error no matter what file I select:
- airsoftsoftwair
- Posts: 5887
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: FileRequest() Not Working on Android
Does this really happen in FileRequest() or are you trying to do something with the file returned by FileRequest()? Keep in mind that FileRequest() now operates using Android's Scoped Access Framework (SAF) which means that the returned file specifications will be different from "normal" files because they can also point to files in the cloud etc. See here for more information on how to deal with those content URIs.
Re: FileRequest() Not Working on Android
This is my code:
The error is reported "In function: FileRequest"
Code: Select all
f$=FileRequest("Select File")
NPrint(f$)- airsoftsoftwair
- Posts: 5887
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: FileRequest() Not Working on Android
So the file requester pops up and you are able to select a file and after you have selected a file you get the "error locking ..." error? What Android version is that?PEB wrote: ↑Sun Feb 01, 2026 1:29 am This is my code:The error is reported "In function: FileRequest"Code: Select all
f$=FileRequest("Select File") NPrint(f$)
Re: FileRequest() Not Working on Android
Yes, that's exactly what happens.
I'm using Android version 16 on a "OnePlus 13".
I'm using Android version 16 on a "OnePlus 13".
- airsoftsoftwair
- Posts: 5887
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: FileRequest() Not Working on Android
Hmm... does PathRequest() show the same behaviour or does that work?
Re: FileRequest() Not Working on Android
Yes, PathRequest() works fine.
And that also has allowed FileRequest() to work properly now too.
So this is what happened:
Using PathRequest(), I selected the desired folder, which caused a permission requester to appear. Once permission was granted, the path was returned to Hollywood as expected.
Previously, when I was testing FileRequest(), there was no permission sought or granted. So apparently that was the problem. But now that permission has been granted---using PathRequest()---I can also use FileRequest() without problems.
Thanks for pointing me to a fix for my problem. That might have been something that was spelled out in the documentation, but I hadn't seen it.
And that also has allowed FileRequest() to work properly now too.
So this is what happened:
Using PathRequest(), I selected the desired folder, which caused a permission requester to appear. Once permission was granted, the path was returned to Hollywood as expected.
Previously, when I was testing FileRequest(), there was no permission sought or granted. So apparently that was the problem. But now that permission has been granted---using PathRequest()---I can also use FileRequest() without problems.
Thanks for pointing me to a fix for my problem. That might have been something that was spelled out in the documentation, but I hadn't seen it.