Android WebView VS Phone Browser

后端 未结 4 1898
旧巷少年郎
旧巷少年郎 2020-11-30 01:53

I\'ve experienced a LOT of strange behaviours with using WebView in Android and I\'m wondering why there are so many diffrences between the W

相关标签:
4条回答
  • 2020-11-30 02:17

    This article outlines your speculation about stock browser differences between manufacturers, that absolutely is true: 5 reality checks every team needs before working on Android webkit

    ...which does cause trouble and mysterious/difficult to diagnose/solve problems.

    As far as your issues with your WebView implementation:

    Version of jquery-mobile may be an issue jquery-mobile loaded into an android WebView if you are using jquery.mobile-1.0.1.min.js you may want to try the uncompressed jquery.mobile-1.0.1.js

    And Flash :-/ Good luck: Screen blinking when using a webview with flash

    Flash in WebView not working on Android 3.2

    Flash video not displaying in WebView for Android 3.0.1

    For loading SWF:

    Load an SWF into a WebView

    loading flash files (.swf) webview in android

    Good luck with that, seems like a lot of variables with devices, Android versions, etc. And will take persistence with trial/error.

    0 讨论(0)
  • 2020-11-30 02:21

    have you checked this question : jquery-mobile loaded into an android WebView

    it might be that you're using the wrong libraries. Just check in any case.

    0 讨论(0)
  • 2020-11-30 02:26

    The stock browser and WebView differs .Using all the tweaks like

        WebView browser;
    
        browser.clearFormData();
        browser.clearHistory();
        browser.clearCache(true);
    
        browser.getSettings().setAppCacheEnabled(true);
        browser.getSettings().setDatabaseEnabled(true);
        browser.getSettings().setDomStorageEnabled(true);
        browser.setWebChromeClient(new WebChromeClient());
    

    still it does not load high resolution images properly which is being loaded perfectly well by the android browser. Only part of the image can be visible on the webview screen which appears fully on normal android browser. This behavior is observed with latest Android 4X SDK as well. Which means android default browser significantly tweaks the webkit/webview code to show any url

    0 讨论(0)
  • 2020-11-30 02:29

    WebView by default is restricted. You should call setWebChromeClient and family to have a decent browsing experience. In addition, don't forget setJavaScriptEnabled() and other similar stuff. Sorry for my brevity... I think that you don't need examples.

    http://developer.android.com/reference/android/webkit/WebView.html

    0 讨论(0)
提交回复
热议问题