Android Question B4a 10.70 Api 30 using webview

Jeanc161

Member
Licensed User
HI all
I installed the new version 10.70 and set the api to 30, but big surprise, when i tried to loadurl with a local file, it give me ERR_NETWORK_ACCESS_DENIED, and only with the api level 30
if i use the api 29, no problems, i can load a url locally, but not with the api 30.
I search the web for an asnwer and find this WE have to set the local file access to true wich it is set to true in older api 29 and below but false in api 30
Itried to set the values in webview but surprise there is no such thing for setting the local file url loading to true
I don't know it we could set this in any ways since the are no method to set this on the webview,
Check sample below

11: https://developer.android.com/reference/android/webkit/WebSettings#setAllowFileAccess(boolean)

Does anybody knoes how to set this flag using the api 30 with the b4a version 10.70 ?? it is very important !!
 

kisoft

Well-Known Member
Licensed User
Hello
You are compiling this project in debug mode - right?... Compile in release mode, then it works fine.
B4X:
WebView1.LoadUrl(xui.FileUri(File.DirAssets,"my_file.html"))
 
Upvote 0

Jeanc161

Member
Licensed User
I will try that, but if there is no way to test this in debug mode, that complicate the debugging process.
But i will try to take a different approch so that i can debug and test it at the same time.
Will let you know if that solve the problem

Thanks.
 
Upvote 0
Top