Pergunta

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.

Foi útil?

Solução

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.

Outras dicas

You only need to add:

chat.getSettings().setDomStorageEnabled(true);

Tested and working.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top