chrisben / imgcache.js

JS library based on the File API to cache images for offline recovery (target: cordova/phonegap & chrome)
Other
826 stars 216 forks source link

Replace toInternalURL() with toURL() for Android #259

Open mattkhaw opened 1 year ago

mattkhaw commented 1 year ago

When the plugin is used in newer versions of Android, it always uses toInternalURL() instead of toURL(). When using toInternalURL() for Android, the plugin is unable to download and save or retrieve any cache files since the url provided by toInternalURL() is invalid.

By adding the above checking, this will solve the issue completely. Feel free to refactor the code if this fix doesn't apply to all scenarios tested.