Domanda

I cannot seem to get a Chatango chat to open in an Android WebView. I can get the chat to open in the stock Android browser and in the android Chrome browser, but not in a WebView. Does anybody know how I can resolve this? My code is as follows:

public void chat()
{
    WebView chat = (WebView) findViewById(R.id.chatView);
    chat.getSettings().setBuiltInZoomControls(true);
    chat.getSettings().setJavaScriptEnabled(true);
    chat.getSettings().setPluginState(WebSettings.PluginState.ON);
    chat.loadUrl("http://lgthesandbox.chatango.com/");
    chat.setWebViewClient(new WebViewClient());
}

I know my code is correct because I can get other URL's to load in the WebView, but the Chatango chat just refuses to open.

È stato utile?

Soluzione

It looks like Chatango is using the Flash player. This is no longer supported on Android and as of KitKat it's not possible for Flash to play in WebView.

Altri suggerimenti

You only need to add:

chat.getSettings().setDomStorageEnabled(true);

Tested and working.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top