InAppBrowser Plugin on mobile

InAppBrowser Plugin on mobile

  

Hi.

I'm working on an app which requires the inappbrowser cordova plugin. I'm not using the forge component as it doesn't allow additional functionality like capturing URL, and closing the browser.

So, I'm using the inappbrowser for an authentication process. After doing so, once I close the inappbrowser, the page becomes unresponsive.

Any ideas on how to fix this?

Hello Saurav.

Do you have any logic after the Inappbrowser window closes? Does it happen no matter the page you open in the Inappbrowser? How are you closing the browser?



Hi Cesar,

So the InAppBrowser is being used for an authentication process. The last page it shows, is a landing page along with the access token as a URL parameter. So once the InAppBrowser lands on this page, it extracts the token and closes the InAppBrowser. At this point, the app stops responding. It redirects to the correct page on the app, but none of the buttons or menus work.

I'm closing the InAppBrowser using Javascript [I've tried inAppBrowser.close() and inAppBrowser.hide()], as mentioned in the inAppBrowser documentation.

Hello, Saurav,

This is kind of shot in the dark, but have could you try closing the InAppBrowser from the app's side, instead of doing it from the callback page? You can use deep links to trigger a screen redirection, which in turn will run the logic to close the window.

If it does not solve the situation, have you tried debugging your app using Chrome? Through this method, you might be able to understand if the InAppBrowser window was actually closed.

Please let us know if you are able to overcome your situation.

Best regards,

Carlos Simões wrote:

Hello, Saurav,

This is kind of shot in the dark, but have could you try closing the InAppBrowser from the app's side, instead of doing it from the callback page? You can use deep links to trigger a screen redirection, which in turn will run the logic to close the window.

If it does not solve the situation, have you tried debugging your app using Chrome? Through this method, you might be able to understand if the InAppBrowser window was actually closed.

Please let us know if you are able to overcome your situation.

Best regards,

Hi Carlos,

I am closing the InAppBrowser from the app side. I'm checking the URL in an If block, and performing the InAppBrowser.close() function, using JavaScript.

Also, I need the URL value, as I'm extracting a parameter from the URL. Would I still be able to use deep links?

Regards,

Saurav Sircar.


Was this ever resolved? I am experiencing the same issue with the InAppBrowser plugin (from Forge). When I close the browser without doing anything in it, the browser closes but then my app is frozen. It does not respond to any touch anymore.