How to communicate between InappBrowser and my capacitor app?
See original GitHub issueI want to send message from inappbrowser back to my app.
We can do that with cordova inappbrowser plugin using postMessage. (window.parent.postMessage).
But in Capacitor Browser Plugin there is no doc for that, also there is no api to listen to that messages? So I can’t able to send data back to my app also.
Current Scenario
I was hoisting my website using firebase. And I was loading that website inside of inappbrowser. And After user did some action, I want to send message to my app to run some code.
window.parent.postMessage(JSON.stringify('message', '*')
This is my code to send the message from inappbrowser to app. That is not working at all.
Expected
Kindly advice, If I am doing something wrong. And kindly tell me, how to achieve it.
Also, Kindly advice how to hide url bar in the inappbrowser?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
@digaus I am not talking about cordova-plugin-inappbrowser. I have gone through that documentation and I know how to do using cordova-plugin-inappbrowser.
I am talking about Capacitor Browser Plugin api, And I want to know how to do like that thing in this plugin?
Should we not use this plugin for inappbrowser requirements?
kindly check the link and advice. https://capacitor.ionicframework.com/docs/apis/browser
Don’t know, it works for me. Maybe create an issue on inappbrowser plugin.