Integration of a chatbox into a webview

To integrate a chatbox into a webview, you need to:

  1. Create an empty HTML page, this page should only contain the following script tag:

<html><head><script src="...bundle.min.js"></script></head><body></body></html>
  1. Then , in the Java code, you need to enable the JavaScript ans the DomStorage in the webview:

webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setJavaScriptEnabled(true);

Last updated

Tous droits réservés @ 2023 dydu.