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

Issue with permissions on Android #229

Open wkyleg opened 6 years ago

wkyleg commented 6 years ago

Hi, I think I am experiencing an issue with permissions on Android. While the code I have works fine in the browser in Chrome, it does not work on Android. When I look at the app in settings, I notice that storage permissions are not enabled. However, enabling storage permissions does not fix this issue. Although the images load on the device, I do not see them stored anywhere in the file system. Any thoughts?

I am using ImgCache 1.1.1, and options are "debug: true."

I am using Angular 5.2.5 and Ionic 3.8.1.

I am also using Cordova, more specifically Android, using Cordova version 8.0.0, cordova-plugin-file version 6.0.1, cordova-plugin-file-transfer version 1.7.1, and cordova-plugin-device version 2.0.1.

The device is a Pixel 2 running Android 8.1.0.

Thanks very much!

oliversalzburg commented 6 years ago

If you have debugging enabled, what does the debug output tell you?

Maistho commented 6 years ago

Are you using Ionics webview: cordova-plugin-ionic-webview? If so, you need to change the URL received from imgcache.js in order for images to load.

Something like in this PR: https://github.com/chrisben/imgcache.js/pull/228/files#diff-0f97643a2a18732757a668494d37a60fR196