Open Astar-Li opened 1 year ago
@Astar-Li could you provide the following info, please?
have you tried the sample app first?
have you requested access to permissions via the permissions manager, like in the sample?
which qt version are you using?
on which android version are you testing the library?
@Astar-Li could you provide the following info, please?
- have you tried the sample app first?
- have you requested access to permissions via the permissions manager, like in the sample?
- which qt version are you using?
- on which android version are you testing the library?
@develtar Dear develtar
have you requested access to permissions via the permissions manager, like in the sample? Yes,I have tried the sample app first.It's run ok on Android 7 8 9 10 11 12 13 But after I put targetSdkVersion = 33, the above inaccessibility situation will result
have you requested access to permissions via the permissions manager, like in the sample? Yes, I applied for permission I even tested the pdf file inside the app because it doesn't require permissions, but the results are still the same
which qt version are you using? QT5.15.2 NDK :21.3.6528147
on which android version are you testing the library? API 33, Android 13
Here are the solutions I tried setAllowFileAccess Official website document explanation: Enables or disables file access within WebView. Note that this enables or disables file system access only. Assets and resources are still accessible using file:///android_asset and file:///android_res.
But so far, I haven't found a way to setAllowFileAccess
But so far, I haven't found a way to setAllowFileAccess
From API level 30 the native Android WebView will have file access disabled by default.
Thank you for the info!
I'll give it a look this weekend :)
@Astar-Li
@Astar-Li
- which JDK version are you using?
- which SDK version are you using?
JDK:11.0.2
SDK :9.0
Android build platform SDK: android-33
@develtar But my tests show that this is only related to targetSdkVersion, which appears when targetSdkVersion>= 30
@Astar-Li i haven't yet found a workaround to this issue: maybe the webview settings could be set natively using the QAndroidJniObject
class, and accessing directly to the WebSettings
method setAllowFileAccess
.
Some of the links i consulted are the following:
If in the meantime you found a workaround, let me know or feel free to make a merge request!
@Astar-Li have you found a workaround?