Soru & Cevap

Android Webview WebSocket connection to failed ...

29.08.2016 - 07:28

Eski sürümlerde bir uygulama yazmıştım. Webview'de disqus yorumları gösteriyordum. Aynısını yine yaptım ama bu sefer normalde olan yorumları göremiyorum, oturuma giriş yaptığım halde oturum açılmamış gibi görüyor ve 2 tane hata alıyorum;

 W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 7877

com.example.rssreader I/chromium: [INFO:CONSOLE(1)] "WebSocket connection to 'ws://realtime.services.disqus.com/ws/2/thread/5101925774?' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED", source: http://a.disquscdn.com/next/embed/lounge.bundle.65405a1936caac9a0a0bc4eb85e92e86.js (1)

Kodlarım şunlar;


WebView= (WebView) findViewById(R.id.webView);

WebView.getSettings().setJavaScriptEnabled(true);

WebView.getSettings().setDomStorageEnabled(true);

WebView.setWebViewClient(new WebViewClient());

WebView.loadDataWithBaseURL(bundle.getString("Link"), "<style>img{display: inline;height: auto;max-width: 100%;}</style>" + bundle.getString("icerik")+ htmlComments, "text/html", "utf-8",null); }

String htmlComments = getHtmlComment( "kutayeen"); public String getHtmlComment( String shortName) { return "<div id='disqus_thread'></div>" + "<script type='text/javascript'>" + "var disqus_shortname = '" + shortName + "';" + " (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;" + "dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';" + "(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();" + "</script>"; }

Webview'de bir şey değişmiş ama anlayamadım.
 

 

6 Görüntülenme

0 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.