Hello,
Is there a simple way to communicate in both directions between B4I code in an app and a webview (local HTML pages) that is embedded within the same app ?
If not I was thinking of writing a websocket server to do the communication:
Would the following be possible and allowed by Apple ?
A B4I app that
- contains a webview that communicates with ...
- ... a websocket server also embedded in the app and written in B4I using raw sockets
The HTML pages in the webview would then be able to communicate with the websocket server to obtain device specific data (eg: GPS coordinates). The websocket would need to service local requests even when external network (WIFI or 2/3/4G) is down.
Thanks
Is there a simple way to communicate in both directions between B4I code in an app and a webview (local HTML pages) that is embedded within the same app ?
If not I was thinking of writing a websocket server to do the communication:
Would the following be possible and allowed by Apple ?
A B4I app that
- contains a webview that communicates with ...
- ... a websocket server also embedded in the app and written in B4I using raw sockets
The HTML pages in the webview would then be able to communicate with the websocket server to obtain device specific data (eg: GPS coordinates). The websocket would need to service local requests even when external network (WIFI or 2/3/4G) is down.
Thanks
Last edited: