// Java: Load the X Video Embed in a WebView
WebView webView = findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
String htmlCode = "<blockquote class=\"twitter-tweet\"><a href=\"https://twitter.com\"></a></blockquote><script async src=\"https://twitter.com\"></script>";
webView.loadDataWithBaseURL("https://twitter.com", htmlCode, "text/html", "UTF-8", null);
// Kotlin: Load the X Video Embed in a WebView
val webView: WebView = findViewById(R.id.webView)
webView.settings.javaScriptEnabled = true
val htmlCode = """<blockquote class="twitter-tweet"><a href="https://twitter.com"></a></blockquote><script async src="https://twitter.com"></script>"""
webView.loadDataWithBaseURL("https://twitter.com", htmlCode, "text/html", "UTF-8", null)
<