Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10795

[InAppBrowser] Circular loop if app had an intent-filter defined for the URL being opened

    XMLWordPrintableJSON

Details

    Description

      Consider the following scenario:

      1. App "X" has an intent-filter defined that says it can open URLs for "www.example.com". (e.g., using https://github.com/EddyVerbruggen/Custom-URL-scheme plugin)
      2. App "X" wants to launch a specific URL on www.example.com in the system browser.
      3. App "X" uses InAppBrowser plugin and calls window.open with _system as the target.

      Actual:
      Since the app itself has an intent-filter defined for "www.example.com", InAppBrowser will just re-launch the app with the intent. In some cases, if a default handler is not chosen, one will get a chooser, however the app will still be listed as the default option.

      Expected:
      The app should be able to launch the URL in the system browser to avoid a circular redirect.

      There is some discussion of this issue on stackoverflow:
      http://stackoverflow.com/questions/18682833/how-to-exclude-a-specific-application-from-action-view-intent
      http://stackoverflow.com/questions/29529027/open-url-in-browser-even-though-my-app-registered-an-intent-filter-for-it

      I think it might be reasonable for InAppBrowser, in openExternal, to explicitly remove the current app from the list.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dpolivy Dan Polivy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: