A apty Active Member Licensed User Longtime User Jul 1, 2021 #1 i would like to load files from DirAssets but with https as described in below article. How is this done in B4A? https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader
i would like to load files from DirAssets but with https as described in below article. How is this done in B4A? https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader
drgottjr Expert Licensed User Longtime User Jul 12, 2021 #2 still trying to figure this out? it isn't done in b4a. not exactly, in any case. you need a custom webviewclient to deal with the webviewassetloader api. you access the client (in b4a) with a javaobject. it's easy to implement and it works for loading files stored in dirassets or dirinternal. but a customwebview will conflict with webview extenders (eg, webviewextras) not to mention our core webview. for the moment, it is still possible to use the file:// url for targetsdk 30. a setting in webviewextras gets you there. Last edited: Jul 13, 2021 Upvote 0
still trying to figure this out? it isn't done in b4a. not exactly, in any case. you need a custom webviewclient to deal with the webviewassetloader api. you access the client (in b4a) with a javaobject. it's easy to implement and it works for loading files stored in dirassets or dirinternal. but a customwebview will conflict with webview extenders (eg, webviewextras) not to mention our core webview. for the moment, it is still possible to use the file:// url for targetsdk 30. a setting in webviewextras gets you there.