简体   繁体   中英

Google place page is not shown in Android webview

I am trying to show

http://www.google.co.jp/m/place#ipd:mode=home

website thru WebView in Android emulator but I am not seeing the web site and seeing only blank space under the place tag of the page.

I am able to see other sites like www.google.com.

Do I need to enable more settings for the google place page?

Permission in the manifest

<uses-permission android:name="android.permission.INTERNET" />

Code

WebView view= (WebView) findViewById(R.id.view1);
View.getSettings().setJavaScriptEnabled(true);
View.getSettings().setBuiltInZoomControls(true);
View.getSettings().setSupportZoom(true);
View.loadUrl(" http://www.google.co.jp/m/place#ipd:mode=home");

You need to do

view.getSettings().setAppCacheEnabled(true);
view.getSettings().setDomStorageEnabled(true);

on the setting object. That fixed the problem for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM