-->

Do 'Chrome Apps for Mobile' use native web

2020-07-25 09:19发布

问题:

Is Chrome Apps For Mobile only a collection of Apache Cordova plugins for each mobile platform or does it intend to also replace the native web-view with Chrome based web-view ?

This question and this slide on Google Docs seem to indicate that it is only a collection of plugins. This question says that on iOS it uses the native web-view.

What about on Android and any future platforms Google might support?

回答1:

Yes, all current Chrome Apps for Mobile using the cca toolkit are cordova based and thus use the Native system WebView.

On iOS, this currently seems unlikely to change because of policy restrictions (but hey, who knows).

On Android, the cordova contributors would like to experiment with supporting the use of custom web renderer implementations. This is being discussed as a possible cordova-4.0 major version bump milestone feature, and would thus target fall/winter of 2014. This is really just a dream at this point, but its certainly a feature that is on everyones mind.

I should note, there are a many downsides to doing this, its not all gravy. Using a custom WebView means adding ~20meg to application download size, and means significantly more memory/video memory usage on device. Alternatively, we could ask users to download a separate "cordova-runtime" app from the store (like Adobe Air for Android, or like you have to download a Java Runtime for desktop), but users usually dislike that experience.

Also, with Android 4.4 KitKat now having a chrome-based WebView, which enabled remote debugging and implements many modern web capabilities, the usefulness of a custom WebView is shrinking.

Finally, there is already a project that does what you ask, but isn't cordova based, and is not used by the cca tool: Intel's Crosswalk Project. Just adding it for reference. Their wiki goes over a lot of tradeoffs with their approach.