You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/18 17:17:04 UTC

[GitHub] [cordova-plugin-inappbrowser] gvalfa opened a new issue #452: exposed beyond app through Intent.getData()

gvalfa opened a new issue #452: exposed beyond app through Intent.getData()
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/452
 
 
   <!--
   Please have a look at the issue templates you get when you click "New issue" in the GitHub UI.
   We very much prefer issues created by using one of these templates.
   -->
   
   ### Issue Type
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] Bug Report
   - [ ] Feature Request
   - [x] Support Question
   
   ## Description
   Hi, try to open an pdf file on Android 9 we receive following error:
   
   03-18 09:38:08.088: D/InAppBrowser(24114): InAppBrowser: Error loading url file:///storage/emulated/0/Documents/CRM-MOBILE/tmp/quote.pdf:android.os.FileUriExposedException: file:///storage/emulated/0/Documents/CRM-MOBILE/tmp/quote.pdf exposed beyond app through Intent.getData()
   
   ## Information
   The workaround to set target android sdk to old 23 is not possible for security contraints on Google Play Console
   
   ### Command or Code
   export const openPdfFile = (url, target = '_blank') => {
      // for android target is always _system because InAppBrowser does not open it;
      // with _system, the default pdf app of the device is opened.
      return isIOS() ? window.open(url, target) : window.open(url, '_system'):
   };
   
   ### Environment, Platform, Device
   all Android devices
   
   ### Version information
   Android 9
   cordova platform
   Installed platforms:
     android 7.1.2
   cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
   
   ## Checklist
   <!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
   
   - [x] I searched for already existing GitHub issues about this
   - [x] I updated all Cordova tooling to their most recent version
   - [ ] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org