Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.1
-
None
-
Host:Linux x86_64
Target:Android arm64_v8a
Description
Premise:
There are 4 test files.
1."日本語.txt" (Japanese filename and known extention)
2."日本語.xxx" (Japanese filename and unknown extention)
3."english.txt" (English filename and known extention)
4."english.xxx" (English filename and unknown extention)
Place them in /storage/emulated/0/Documents .
There are some ways to specify file.
a. Choose file from "Documents" on Sidebar (a1.jpg) and open "Documents" folder (only .txt files are visible)(a2.jpg)
b. Choose file from "(User)'s (Device Name)" on Sidebar(b1.jpg) and open "Documents" folder (all files are visible)(b2.jpg)
Attached sample program shows Android native QFileDialog and when you choose one of file above "Application Output" in Qt Creator says "file open succeeded: true (or false)".
Result is shown below.
日本語.txt | 日本語.xxx | english.txt | english.xxx | |
---|---|---|---|---|
from "Documents" | success | (not visible) | success | (not visible) |
from "(User)'s (Device Name)" | fail | fail | success | success |
When it fails Application Output is like this:
D libAndroidFileTest_arm64-v8a.so: filename: "content://com.android.externalstorage.documents/document/primary%3ADocuments%2F日本語.txt" W libAndroidFileTest_arm64-v8a.so: java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary%3ADocuments%2F日本語.txt from pid=7907, uid=10573 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs W libAndroidFileTest_arm64-v8a.so: at android.os.Parcel.createExceptionOrNull(Parcel.java:3023) W libAndroidFileTest_arm64-v8a.so: at android.os.Parcel.createException(Parcel.java:3007) W libAndroidFileTest_arm64-v8a.so: at android.os.Parcel.readException(Parcel.java:2990) W libAndroidFileTest_arm64-v8a.so: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190) W libAndroidFileTest_arm64-v8a.so: at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153) W libAndroidFileTest_arm64-v8a.so: at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:780) W libAndroidFileTest_arm64-v8a.so: at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2034) W libAndroidFileTest_arm64-v8a.so: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1849) W libAndroidFileTest_arm64-v8a.so: at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1682) W libAndroidFileTest_arm64-v8a.so: a D libAndroidFileTest_arm64-v8a.so: file open succeeded: false
Attachments
Issue Links
- relates to
-
QTBUG-105110 Android: FileDialog not working - unable to select file correctly
- Closed