To load a HTML5 webpage try following settings on client side(in webview) :
myWebView = new HTML5WebView(context);
myWebView.clearFormData();
myWebView.clearHistory();
myWebView.clearCache(true);
myWebView.getSettings().setAppCacheEnabled(true);
myWebView.getSettings().setDatabaseEnabled(true);
myWebView.getSettings().setDomStorageEnabled(true);
myWebView.loadUrl(url);
On Tuesday, April 27, 2010 7:45:19 AM UTC+5:30, thrusty wrote:
>
> I'm having a similar problem. Here's an example of a web page that
> doesn't work within a WebView:
>
> https://m.gmail.com/
>
> I setup my WebView in a manner similar to Nelson...even setup a
> WebChromeClient that implements onExceededDatabaseQuota as suggested
> previously by the PhoneGap folks.
>
> No luck -- the browser displays a black page with no text or
> anything. This does not happen with simple pages or pages that merely
> "detect" the support for HTML5 features such as http://html5test.com/
>
>
> On Mar 16, 10:46 am, AJ <[email protected]> wrote:
> > Hi Nelson
> > Can you share the link/webpage which you are trying ?
> >
> > Thanks,
> > AJ
> >
> > On Mar 16, 7:36 pm, nikhil <[email protected]> wrote:
> >
> > > Normally, this works for me
> >
> > > webView= (WebView) findViewById(R.id.webview);
> > > webView.setWebChromeClient(new WebChromeClient());
> > > webView.setWebViewClient(new WebViewClient());
> > > webView.getSettings().setJavaScriptEnabled(true);
> > > webView.loadUrl(url);
> >
> > > On Mar 16, 10:34 am, Nelson <[email protected]> wrote:
> >
> > > > Thanks for your reply.
> >
> > > > Yes I did:
> >
> > > > webView.setWebChromeClient(new WebClient(this));
> > > > WebSettings webSettings = webView.getSettings();
> > > > webSettings.setSavePassword(false);
> > > > webSettings.setSaveFormData(false);
> > > > webSettings.setJavaScriptEnabled(true);
> > > > webSettings.setSupportZoom(false);
> > > > webSettings.setDatabaseEnabled(true);
> > > >
> webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
> > > > webSettings
> > > > .setDatabasePath("/data/data/
> > > > my.android.workbench.webviewoverridedemo/app_database");
> > > > webSettings.setAllowFileAccess(true);
> >
> > > > // workaround so that the default browser doesn't
> take over
> > > > webView.setWebViewClient(new MyWebViewClient())
> >
> > > > Even that, the webview browser still cannot render the web page,
> which
> > > > can be rendered well on the native browser of Android emulator.
> >
> > > > Thanks,
> >
> > > > Nelson
> >
> > > > On Mar 10, 12:51 pm, nikhil <[email protected]> wrote:
> >
> > > > > have you added all the clients? webviewclient,webchromeclient,
> enabled
> > > > > javascript etc.
> >
> > > > > On Mar 8, 4:08 pm, Nelson <[email protected]> wrote:
> >
> > > > > > Dear All,
> >
> > > > > > I am working on a WebView browser on Android (like here:
> http://developer.android.com/resources/tutorials/views/hello-webview....)
> > > > > > and trying to load a webpage with HTML5 features. However, the
> page
> > > > > > was not loaded very well - only part of it can be shown on the
> WebView
> > > > > > browser. Interestingly, this same page can be loaded by the
> native
> > > > > > browser of Android emulator very well. I am working on Android
> 2.0.
> >
> > > > > > Can anyone give me some suggestions that what could the things I
> can
> > > > > > work on (like settings) to make my WebView browser behave same
> as the
> > > > > > native browser? My page has HTML 5 features as said, are there
> > > > > > differences between what WebView can do and what native browser
> can do
> > > > > > in this regard?
> >
> > > > > > Thanks a millions for you guys' help. Really appreciate it.
> >
> > > > > > Nelson
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en