Android Example [WebViewExtras] send data: from WebView to B4X / from B4X to WebView [addJavascriptInterface] [CallSub]

addJavascriptInterface [WebViewExtras] CallSub [B4XPages] Example

I created a Example (after search and not found)

send data: from WebView to B4X / from B4X to WebView ,
using addJavascriptInterface and CallSub,

thre are sam B4XPages also, hope it's useful, and there are some room for improvement


(/*
After I work on a Example in AndroidStudio I make same in B4A,
it shows for AndroidStudio also how to make
transparent Top Bar [// like GoogleMaps - I like it :) //] ,
Action Bar ,
Fullscreen ,
AndroidStudio zip atached
*/)


Libraries
B4XPages 1.05
Core 9.90
HttpServer 1.00
Network 1.52
Phone 2.50
Reflection 2.40
StringUtils 1.12
WebViewExtras 1.42
WebViewSettings 1.13



B4XaddJavascriptInterface:


B4X zip

B4APage_addJavascriptInterface.png





------

AndroidStudio JSBridge:
AndroidStudio zip 11MBytes
AndroidStudioJSBridge.png
 
Last edited:
HI, Friends,
please help me, i not can run example webview, the error run
1.open url, ok
2. links internal site web iframe video not load, and option full screen inactive
3. links internal site page podcast, not answer audio
4. for example site only youtube.com not zoom screen,
5. the orientation not change.
4. i have problem in march 2020 i not understand how to config webview o webviewextras o webviewsettings.
 
Top