I am developing a hybrid android app, where each click on the link opens a new activity with a new webview. The Android webview takes a lot of time to load even if the resource are cached in the local directory. I want to reduce this time as much as possible to give a good user experience.
The things that I have tried so far -
WebSettings
settings.setRenderPriority(WebSettings.RenderPriority.HIGH)
Webview LayerType
if (Build.VERSION.SDK_INT >= 19) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } else { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); }
Hardware Acceleration
<application android:hardwareAccelerated="true" ...>
Some other popular companies that have hybrid apps are Amazon & Quora. But they use third party libraries. However I am interested in knowing how can we achieve the same speed with android webview.
You should have a look onto project cross walk it is a web view made specifically for building cross platform hybrid apps although it's size is kind of big it will save you a lot of time targeting different web views since you are coding and testing using just one browser which is the cross walk's webview