F
F
funfoorique2018-07-31 13:23:25
Android
funfoorique, 2018-07-31 13:23:25

android app. How to make HTML5 Canvas work in WebView?

Good afternoon, I can’t get canvas to work in WebView. In the application manifest, I set the attribute android: hardwareAccelerated = "true", in the onCreate method I set WebChromeClient and WebViewClient, I enable js using setJavaScriptEnabled (true). the rest of the js on the site works, but on canvas pages it doesn't. in the webview debugger, the console is empty. what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Spiridonov, 2018-07-31
@customtema

Does the script work in the browser, no errors?

myWebView.getSettings().setJavaScriptEnabled(true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question