Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520
My Carrier: Software Developer

PhoneGap

Hi,

 

does anybody create successfully an application using file io with PhoneGap?

 

I can't find a way to use playbook and phonegap also not with git project started.

https://github.com/tinyhippos/phonegap-blackberry-webworks

 

best regards

Contributor
Posts: 33
Registered: ‎04-30-2012
My Device: PlayBook, DevAlpha
My Carrier: 3AT

Re: PhoneGap

Unfortunately not. I have spent many hours trying to get it working, but it seems that it is not implemented for the PlayBook.

When trying to access the filesystem, I get the error "Class File cannot be found".

 

The only thing I found on the net about it is this:

http://groups.google.com/group/phonegap/browse_thread/thread/9e0c404589a407ee 

 

 

Does anyone know about a workaround for this or a timeline on when it will be implemented for the PlayBook?

I'm currently using the FileWriter to continously write things into a file. The only thing I have found in the API Docs for WebWorks is saveFile which creates a new file with data. But it seems that it can't modify the file once its created. Does anyone know a function that can do this?

Developer
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520
My Carrier: Software Developer

Re: PhoneGap

Thanks for answer. Does the FileWriter work in WebWorks Apps? Is there a documentation/example for it?

 

I use the saveFile method of Webworks API but have trouble manipulating the filestream to write a bom (byte order mark) to an UTF-8 file.

 

best regards

Contributor
Posts: 33
Registered: ‎04-30-2012
My Device: PlayBook, DevAlpha
My Carrier: 3AT

Re: PhoneGap

The FileWriter is part of PhoneGap and doesn't work on the PlayBook. That's why I was asking for a WebWorks API that could replace it. The closest I found was saveFile, but it seems that it can only save a file once and then can't modify it anymore.