Tazaf / ionicitude

AngularJS module for using the Wikitude cordova plugin in an Ionic project.
http://tazaf.github.io/ionicitude/
MIT License
24 stars 10 forks source link

CaptureScreen Fails to save in Bundle #7

Closed winsonchanwc closed 7 years ago

winsonchanwc commented 8 years ago

Hi, i got some problem on capturing screen in Android...

//custom Date
var d = new Date();
var filepath = d.valueOf() + '_snapshot.jpg';
Ionicitude.captureScreen(false, filepath)
                .then(function (absoluteFilePath) {
                 ..success stuff
                 } ,
                 .catch({fail stuff})

it works in iOS but not in Android, it got open failed: EROFS (Read-only file system) error Am i missing something? i have already included WRITE_EXTERNAL_STORAGE in permissions

Thanks for ur help

Tazaf commented 8 years ago

Hello !

As said in the doc, the captureScreen method is a simple promise-wrapper around the native Wikitude captureScreen method. And since the promise behavior works as expected, the problem is caused by the Wikitude plugin.

I'm afraid that's a problem you'll have to report to the Wikitude Staff itself. I can't help you as I don't know how Wikitude deals with the saving of files under the hood.

Sorry :confused:

winsonchanwc commented 8 years ago

Hello, its me again I have got a workaround with getting base64 of the image to display in my css background after captureScreen..

just a side question... have u tried to use https://github.com/agamemnus/cordova-plugin-xapkreader to build android release app? as Android got that <100MB app size issue but my app is like ~300MB... so i need to generate an .obb to fix this, however wikitude-plugin and the xapkreader somehow conflicted, wikitude requires sdk-23 but xapkreader requires sdk-22..

Thanks for your swift reply

Tazaf commented 8 years ago

Hi.

No, I didn't tried using the plugin you linked. I was not aware of this Android limitation, though, so I thank you for the tip. Can't help you on that one. Sorry 😕 (again)