문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

You only need to add:

chat.getSettings().setDomStorageEnabled(true);

Tested and working.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top