Issue with webview with emulator and some devices Android

Posted by Yasir Khan on Stack Overflow See other posts from Stack Overflow or by Yasir Khan
Published on 2012-11-22T09:07:00Z Indexed on 2012/11/26 5:04 UTC
Read the original article Hit count: 167

Filed under:
|

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. :-(

© Stack Overflow or respective owner

Related posts about android

Related posts about android-webview