cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agamemnus <...@git.apache.org>
Subject [GitHub] cordova-plugin-whitelist pull request: Automatically whitelist con...
Date Fri, 12 Jun 2015 18:29:33 GMT
Github user agamemnus commented on the pull request:

    https://github.com/apache/cordova-plugin-whitelist/pull/6#issuecomment-111581796
  
    ``cdvfile://`` is a protocol used in Cordova for accessing saved files: https://github.com/apache/cordova-plugin-file.
    
    Regarding ``content://``, a little back-story which should help explain. Google Play has
a 50 megabyte apk size upload limit. To go beyond that it uses an expansion file system which
allows up to (I think) 2 gigabytes of extra storage. The expansion files are typically downloaded
to and stored in ``Phone/Android/obb`` as zip files with 0 compression ("STORE"). To access
the files Google recommends using a content provider (http://developer.android.com/guide/topics/providers/content-providers.html).
(A content provider is used for a few more things, as well...)
    
    I made a comprehensive plugin for using these expansion files here: https://github.com/agamemnus/cordova-plugin-xapkreader/.
It links to and makes use of 2 Android libraries made by Google called ``play_apk_expansion``
and ``play_licensing``. A number of people wanted to use Cordova 5, but the plugin doesn't
work with 5 because ant support is not supported or broken.
    
    Unfortunately, Gradle support is somewhat broken as well as I describe in https://issues.apache.org/jira/browse/CB-9132.
    
    Even going past the Gradle issues, the whitelist requirement in Cordova 5 means that by
default ``content://`` files (the method used to access files in the zip file) are not usable.
There are two fixes to this -- patching the whitelist plugin, or adding content:// in the
CSP tag.
    
    P.S.: Even with this whitelist plugin patch, I am having issues loading JPG files (but
not other types of files) using the ``content://`` protocol (my Chrome debugger claims that
``content://`` protocol is unrecognized), but this may be a Chromium or Crosswalk issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message