Reputation: 139
I'm trying to create a application to access a gmail account. I used a WebView with a WebViewClient and load the url http://www.gmail.com. See code below
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.email_main_layout);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginState(PluginState.ON);
mWebView.getSettings().setAppCacheEnabled(true);
mWebView.setWebViewClient(new EmailWebViewClient());
mWebView.loadUrl("http://www.gmail.com");
}
The site loads normally. However, after loged in, the emails messagens are not shown, only a progress loading appears and other options. Since I can use gmail in android browser, what settings I have to do in my webview to show gmail correctly?
Upvotes: 0
Views: 512
Reputation: 139
It was missing set DOM storage in webview property
mWebView.getSettings().setDomStorageEnabled(true);
Upvotes: 1