Android Question HTML5 not working with WebView

M.G.R

Member
Licensed User
Longtime User
Hello,
i try to load that page to check the HTML5 work
B4X:
WebView1.LoadUrl("https://html5test.com/")
but the app cruch and close!
i've even tried WebViewExtras2 but the same.
i've enabled all options
B4X:
    WVE.JavaScriptEnabled=True
    WVE.getsettings.SetAllowContentAccess(True)
    WVE.GetSettings.SetAllowFileAccess(True)
    WVE.GetSettings.setDOMStorageEnabled(True)
    WVE.GetSettings.SetJavaScriptCanOpenWindowsAutomatically(True)
    WVE.GetSettings.SetAppCacheEnabled(True)
    WVE.GetSettings.SetBuiltInZoomControls(True)
    WVE.GetSettings.setSupportZoom(True)
    WVE.GetSettings.SetGeolocationEnabled(True)
    WVE.SetWebViewClient(DWVC)
    WVE.SetWebChromeClient(DWCC)
    WVE.AddJavascriptInterface(JSClient,"B4A")
    WVE.GetSettings.SetMediaPlaybackRequiresUserGesture(False)
any suggest?
 

Jorge M A

Well-Known Member
Licensed User
Chechk this one, maybe it can help you.
 
Upvote 0

M.G.R

Member
Licensed User
Longtime User
Chechk this one, maybe it can help you.
Not work, i got that error in log:
B4X:
BLOCKED: interaction.dragdrop is on the blacklist for this browser! in https://html5test.com/scripts/8/engine.js (Line: 4262)
 
Upvote 0

Jorge M A

Well-Known Member
Licensed User
Strange. It works well here on two devices. I've never seen that message before.
It might help others if you list the details of the equipment, version, etc.

By the way, did you update targetSdkVersion="28" in the manifest?
 
Upvote 0

M.G.R

Member
Licensed User
Longtime User
i used emulator (Android 9 Pie - API 28)
yes i updated targetSdkVersion="28" in the manifest but same situation.
 
Upvote 0

Jorge M A

Well-Known Member
Licensed User
i used emulator
That is relevant information and should be provided in the initial question.

Even in the emulator it works with your URL, despite those messages that you can apparently ignore (?).
1584878399825.png


Tip: Edit the manifest and add the macro
Manifest:
SetApplicationAttribute(android:usesCleartextTraffic, "true")
 
Upvote 0
Top