android - Web View not rendering the page -
i have web site want view on web view.
i have created sample application of web view load url of web site.
this code of activitiy. code load other video specific web sites youtube. desktop browser can open web site not activity. have videos rendered in web site.
from mobile chrome browser not playing playing stock browser. changed user agent of web view of stock browser same results.
package com.example.testcontent; import android.app.activity; import android.os.bundle; import android.util.log; import android.view.menu; import android.webkit.websettings; import android.webkit.websettings.pluginstate; import android.webkit.webview; import android.webkit.webviewclient; public class webviewactivity extends activity { private final string tag = "webviewactivity"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_web_view); webview webview = (webview) findviewbyid(r.id.webview); websettings webviewsettings = webview.getsettings(); webviewsettings.setjavascriptenabled(true); webviewsettings.setjavascriptcanopenwindowsautomatically(true); webviewsettings.setpluginstate(pluginstate.on); webview.getsettings().setallowfileaccess(true); webview.setsoundeffectsenabled(true); webview.setwebviewclient(new webviewclient()); // webviewsettings // .setuseragentstring("mozilla/5.0 (linux; u; android 4.4.2; en-in; htc_one_dual_sim build/kot49h) applewebkit/534.30 (khtml, gecko) version/4.0 mobile safari/534.30"); log.i(tag, "user agent used in web view " + webviewsettings.getuseragentstring()); webview.loadurl("http://mywebsite.com"); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.web_view, menu); return true; } }
also log get
06-27 17:38:13.458: w/iinputconnectionwrapper(30916): reportfullscreenmode on inactive inputconnection 06-27 17:38:21.877: v/webviewchromium(31760): binding chromium background looper looper (main, tid 1) {41e47bb0} 06-27 17:38:21.877: i/chromium(31760): [info:library_loader_hooks.cc(112)] chromium logging enabled: level = 0, default verbosity = 0 06-27 17:38:21.877: i/browserprocessmain(31760): initializing chromium process, renderers=0 06-27 17:38:21.897: w/chromium(31760): [warning:proxy_service.cc(888)] pac support disabled because there no system implementation 06-27 17:38:21.907: i/adreno-egl(31760): <qegldrvapi_eglinitialize:316>: egl 1.4 qualcomm build: (cl4169980) 06-27 17:38:21.907: i/adreno-egl(31760): opengl es shader compiler version: 17.01.10.spl 06-27 17:38:21.907: i/adreno-egl(31760): build date: 12/25/13 wed 06-27 17:38:21.907: i/adreno-egl(31760): local branch: 06-27 17:38:21.907: i/adreno-egl(31760): remote branch: 06-27 17:38:21.907: i/adreno-egl(31760): local patches: 06-27 17:38:21.907: i/adreno-egl(31760): reconstruct branch: 06-27 17:38:21.967: i/webviewactivity(31760): user agent used in web view mozilla/5.0 (linux; android 4.4.2; htc 1 dual sim build/kot49h) applewebkit/537.36 (khtml, gecko) version/4.0 chrome/30.0.0.0 mobile safari/537.36 06-27 17:38:22.027: i/inputmethodmanager(31760): [startinputinner] editorinfo { packagename=com.example.testslccontent, inputtype=0xa1, imeoptions=0x12000000, privateimeoptions=null }, windowgainingfocus=android.view.viewrootimpl$w@41ea1b88, mservedview=android.webkit.webview{41e7a8a0 vfedhvc. .f....id 48,48-1032,1653 #7f080000 app:id/webview} 06-27 17:38:22.027: w/awcontents(31760): nativeondraw failed; clearing background color. 06-27 17:38:22.138: i/chromium(31760): [info:async_pixel_transfer_manager_android.cc(56)] async pixel transfers not supported 06-27 17:38:22.168: i/chromium(31760): [info:async_pixel_transfer_manager_android.cc(56)] async pixel transfers not supported 06-27 17:38:22.178: e/qdutils(31760): fbioget_fscreeninfo failed 06-27 17:38:22.238: d/libc(31760): [net] getaddrinfo+,hn 18(0x70726f78792e62),sn(),family 0,flags 1024 06-27 17:38:22.238: d/libc(31760): [net] getaddrinfo-, 1 06-27 17:38:22.238: d/libc(31760): [net] getaddrinfo_proxy+ 06-27 17:38:22.238: d/libc(31760): [net] getaddrinfo_proxy-, success 06-27 17:38:24.020: i/chromium(31760): [info:async_pixel_transfer_manager_android.cc(56)] async pixel transfers not supported
only error coming 06-27 17:38:22.178: e/qdutils(31760): fbioget_fscreeninfo failed.
i on 4.4.2. code compiled against api level 19.
cheers, saurav
Comments
Post a Comment