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

Android N unable to open locally downloaded file

    XMLWordPrintableJSON

Details

    • Patch

    Description

      The InAppBrowser is unable to open "file://" see blog https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en

      iOS works fine and this is specifically on android.

       

      Suggestion

      Add in method to handle local files using the "FileProvider". There are other plugins that specifically handle this but are a bit bloaty to add just to open a local file. This feature would be nice to have in the inAppBrowser plugin as a matter of convenience.

      If this does not seem applicable please close, so we can devise a light plugin to handle this in our projects going forward.

       

      Steps we took to fix the problem

      1. Added in open local file method
      2. Used the FileProvided to get a acceptable uri
      3. Open the uri with an intent to a default application

       

      Attachments

        1. inappbrowers.png
          43 kB
          Sean Molyneaux

        Issue Links

          Activity

            People

              Unassigned Unassigned
              BrainstemStudio Sean Molyneaux
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: