Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
6.4.0
-
None
-
None
-
Android KitKat 4.4.2
Description
I'm using ngCordova cordova-plugin-file to try to read an image that I then want to convert to bytes. I actually want to read it as dataURL and I'm getting an error.
/* The image is located at file:///data/data/com.xxx.housekeeping/cache/tmp_Screenshot_2017-04-27-09-30-42-1816635709.png on an Android device */
`$cordovaFile.readAsText(cordova.file.cache, "tmp_Screenshot_2017-04-27-09-30-421403920141.png")
.then(function (success)
, function (error)
{ // error console.log(error); });`
I tried using both readAsText and readAsDataURL but I get
`Wrong type for parameter "uri" of resolveLocalFileSystemURI: Expected String, but got Undefined.`
as an error. This is on an Android device.