Interaction between Vue JS webview and app android/ IOS

How to develop an interaction between webview written in vuejs - javascript and an android or IOs app ?

1 Like

Have you solved the problem?

beforeMount(){
window[‘MyWebview’] = {
components: this,
pictureAcquired: (msg) => this.pictureAcquired(msg),
};
}

var nativeApp;
function pictureAcquired(msg) {
window.MyWebview.pictureAcquired(msg);
}

export function openCamera(){
console.log(“openCamera”)
// Call to Android App
if (window.nativeApp) window.nativeApp.funnelReady();
// Call to IOS App
else if ((window[‘webkit’]) && ( window[‘webkit’].messageHandlers) && (( window[‘webkit’].messageHandlers.nativeApp))) window[‘webkit’].messageHandlers.nativeApp.postMessage({“openCamera”: {}});
}