Why some B4X developers prefer WebView?

roumei

Active Member
Licensed User
I only use it to display 3D models (Three.js, JavaScript). The rest of the user interface (on top of the WebView) is made of normal views.
 

Attachments

  • pTApp.jpg
    pTApp.jpg
    282.1 KB · Views: 207

peacemaker

Expert
Licensed User
Longtime User
Often for user it needs to show meta-info: text with photos, video. And web-links here can be useful to offer for the user functions.
And this meta-info can be required to be got from some source, so - non-self locally generated info.
Here WebView is the simplest way for manual user control, instead of making a complex visual interface, for which the info must be parsed into the types.

3rd party visual info: maps, articles, web-sites... Say, "about the app" page with version, description, icon, links to website, email is much simpler to show in WebView as HTML.
WebView is able to show huge photos without OutOfMemory.
 
Last edited:

deboerr

New Member
I find that android browsers are very clunky, not-user friendly and they cut the usable screen real estate ... so for my apps, a webview + WebViewExtras + addWebChromeClient works well.
 

peacemaker

Expert
Licensed User
Longtime User
webview + WebViewExtras + addWebChromeClient works well
Yes, indeed - mostly it had to be used full functional set of libs and code, to have a normal webview client
 

FrostCodes

Active Member
Licensed User
Longtime User
I am a solo Indie developer with limited funds for hiring and this means I must move with speed and do most things myself, Webview saves me lots of time.

I use Webview + WebviewExtras a lot because it makes more sense that I can easily reuse my exact code for web, android, and desktop as I made my own mini framework, and it's responsive by default so even for desktop, I can provide my users with an excellent resizing experience without writing almost any extra code.

The views also look the same across all platforms but asides from that I am able to tap into a lot of libraries and frameworks in a few lines like VueJs, Axios, socket io, etc.

Another reason why I use web view is it doesn't easily crash even when there is an error, instead, I added a global error handler that tells the app to report all errors to me and this has really made my apps very stable across a lot of devices, I barely get error reports these days.

Another reason is I am able to create my apps to interface with native functions. For example, I monetize with AdMob and I am able to send push notifications, access SQLite, and everything else B4a/B4J can access.

Another reason is I am able to dynamically send updates to my users, for example:
Users can get access a new feature without updating their app at all, all the new feature code is just a new HTML-like page.
This is very important in my location because users mostly don't bother to update your app and they complain when they don't get new features even though it's no fault of yours even when you tell them a new update is ready.

Lastly, I don't have to deal with too much memory management, for example, I can easily display large images anyhow I want, play audio, etc without thinking of if my app is configured properly to handle it well across many devices, all I have to do I write an HTML tag and I am done in just 1 to 5 lines.

There are many other reasons but this just some of what I do with webview.
 
Last edited:
Top