The Android Webview

A presentation at PhoneGap Day EU in May 2015 in Amsterdam, Netherlands by Niels Leenheer

Slide 1

Slide 1

the android webview niels leenheer - phonegap day eu 2015

Slide 2

Slide 2

what is a webview? a system level component for displaying html in applications

Slide 3

Slide 3

up to android 4.3, the webview was based on webkit android 4.4 and later use a webview based on chromium

Slide 4

Slide 4

the old webkit webview has not been properly updated in the last four years almost no changes between android 4.0 and 4.3

Slide 5

Slide 5

the webkit webview is slow and has outdated standards support its standards support can be compared to ios 4 or 5

Slide 6

Slide 6

the chromium webview is not only much faster, it has much better standards support at the same level or even better standards support as ios 8

Slide 7

Slide 7

the chromium webview will be updated regularly android 4.4 ⟶ chromium 30 android 4.4.3 ⟶ chromium 33 android 5 ⟶ chromium 37 or higher

Slide 8

Slide 8

in a couple of years all android phones will have the chromium webview

Slide 9

Slide 9

but today we still have to deal with the webkit webview 4.4 40% 5 10% 2.2 - 2.3 6% 4.0 5% 4.1 - 4.3 39%

Slide 10

Slide 10

but unfortunately we are not dealing with just one webkit webview

Slide 11

Slide 11

device manufacturers improved the default browser differentiation by having better standards support than your competitors

Slide 12

Slide 12

differentiation is just a pretty name for fragmentation

Slide 13

Slide 13

the reality is that we now have many different webviews that all behave slightly different not only different versions of webkit, but also different features enabled

Slide 14

Slide 14

better standards support is useless if it is only available on a subset of devices apps still need to be build for the lowest common denominator

Slide 15

Slide 15

webgl ? form field types webaudio indexeddb requestanimationframe websockets

Slide 16

Slide 16

having frequent updates is not always good! removing older apis and features can cause legacy apps to break

Slide 17

Slide 17

some devices will never get an upgrade to android 5 chromium 30 and 33 based webviews will be around for the next couple of years

Slide 18

Slide 18

bad performance limited standards support vendor specific versions

Slide 19

Slide 19

better standards support limited control

Slide 20

Slide 20

fragmentation

Slide 21

Slide 21

how to deal with this mess

Slide 22

Slide 22

test as often as possible, on as many devices as possible

Slide 23

Slide 23

perhaps try an open device lab? 144 labs across 34 countries and 4002 devices available

Slide 24

Slide 24

test as often as possible, on as many devices as possible

Slide 25

Slide 25

but there is also another solution

Slide 26

Slide 26

crosswalk

Slide 27

Slide 27

Slide 28

Slide 28

thank you @html5test