Some WebView thoughts …
Every time I had to use a WebView in an a native App I ask myself if that is extremely necessary and which kind of advantages
using it brings in, some questions come immediately into my mind like:
- Is this WebView gonna load and external url or html code stored on the device?
- Is gonna use
Javashit? (ops I mean Javascript) - Is that WebView an important section of the app, something the user is gonna see and interact with often ?
- Is the html content updated often?
- Is the html content made in a proper way to used on a smartphone?
- Can we replace the WebView with a native screen ui/logic?
Why all these questions, well for start the WebView is a powerful component but it’s pretty easy to overuse it in an app particurarly
if the main screen of your app is based on that cause let’s get it clear here:
Ux/UI experience provided through WebView feel most of the time clunky, user perceive them as something extraneous from the rest of the app different, and this break the flow
Yes, there’re guides and best practices out there for this (https://developer.android.com/guide/webapps/) , but let be honest, average user notice the difference!
As you know starting from Android 5.0 Google decided to separate the WebView from the core operating system, this was a smart move cause it was possible to deliver security fixes and improvements
to old and new devices including the ones that couldn’t support new Os versions.
Now a funny thing, have you notice how often the Android Systen WebView is updated?
More often than you think, in average, according to my latest monitoring, every 3.5 weeks.
That’s cool right? Yes definitely but as every developer know pretty well, lot of updates mean also lot of potential new bugs … right? 🙂
Sure, you can take a look at them here:
And what if one if this bug happens randomly and corrupts the WebView component in a way that every web page loading is failing resulting in a blank page?
What if the only temporary way to get rid of this is uninstall the app and re-install it again until eventually the issue happens again?
Guess what? This happened some time ago with the release of the major 75 version … and the bug is apparently still there.
If you think that the WebView is a stable component well you better think twice …