[InAppBrowser Plugin] can you notify up to container app from event in web browser?

[InAppBrowser Plugin] can you notify up to container app from event in web browser?

  
Forge Component
(0)
Published on 27 Apr by OutSystems R&D
0 votes
Published on 27 Apr by OutSystems R&D

Is there any way I can have an event thrown in a webpage in the in app browser to notify the app containing the browser that it needs to do something?  I will be doing another outsystems "web" application page within the browser, but I would like for something done within the browser to notify the parent "mobile" app that it needs to perform some action.

I would like to know too. Doing a payment gate and need to check for a success or fail URL in the the in App Browser to complete a client action.

Peter, thanks to Rui with Outsystems we were able to get it working.  As he made it I will leave it to Rui if he wants to make it a forge item but basically here is what you do:

- start an in app browser using the forge item and start event listeners, specifically the "exit" event is what we look at and in the listener you can see what url the browser is exiting to

- forward the in app browser to where you want it to go to, what we did was for CAS authentication so we forwarded it to the CAS authentication page with a return url to another "web" OutSystems app that we had made that receives the CAS token, checks the token and then forwards itself to a false url like "http://donewithmystuff.com"

- on the exit event listener for the in app browser in your mobile app if you see an "exit" event you check the url returned from the listener against what you know it should be (the false url above) and if so you close the browser and run an action to do what you need to check.  For us it was checking back with our OutSystems page database to see if the token supplied to the CAS page has someone logged in associated with it.

Let me know if that helps

Hello,


Could you please explain how could we start event listener, in my case i want to listen to 'loadstart' event


Thanks


Mohammad, there is a good bit involved with getting that working.  I think Rui may have made a forge item and I sent him a message this morning.

Mohammad Modallal wrote:

Hello,


Could you please explain how could we start event listener, in my case i want to listen to 'loadstart' event


Thanks


Here you go: http://www.outsystems.com/forge/component/1674/inappbrowserevents/