Issue with webview with emulator and some devices Android
- by Yasir Khan
I am developing an application that is focuses on on WebView i am loading map from a webpage and calling subsequent java script request on it but i do not know what is happening with Galaxy Tab 7' and my emulator too after running well first time if i visit the application again its just showing blank page.
Code:
mMapView = (WebView) findViewById(R.id.mapview);
mMapView.clearCache(true);
mMapView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mMapView.getSettings().setJavaScriptEnabled(true);
mMapView.loadUrl(mapurl);
mMapView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
Log.e("Page loading","Url is :"+url);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// TODO Auto-generated method stub
view.loadUrl(url);
return true;
}
});
initially i thought its a cache problem and i added clearcache() without any help. :-(