简体   繁体   中英

WebView or Phonegap … what to use for better experience with HTML5 app

I would like to build an App in HTML5. I have play around with Phonegap on Android but the whole feeling like scrolling and touch is somehow not the best one. I have seen this App: https://play.google.com/store/apps/details?id=com.indeed.android.jobsearch&hl=en and here we see some HTML load in container.

How is this done? Is this only an Android Wrapper with WebView and the HTML content is loaded in it? Why is Phonegap so slow, when it is using WebView as well? What is the trick on the App above?

Thanks Nik

They seem to be using the Android WebView, WebViewClient, WebChromeClient. They have extended them for some functionality it seems, not sure if that would actually alter performance.

PhoneGap has a lot of plugins and other things that allow more functionality compared to just using a regular WebView this does affect performance.

If your build target is low you can try adding the hardwareaccelation="true" in the manifest which might give you a performance boost on device which allow it. It is on by default if you have a newer build target.

I use PhoneGap since I also make Apps for iOS and I have no clue how to use their WebView counterpart so I just stick with PG for Android and iOS. I am pretty sure I could gain some performance by sticking to a regular WebView for Android but I don't think it is worth the effort for my Apps.

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