08-04-2012 05:37 AM
I want to download image from URL link and store the image in local folder in Webworks BB10.
But I didn't got code for this.
If any one know such code or having any solution then please help me....
Thanks & Regards,
Solved! Go to Solution.
08-04-2012 05:46 AM - edited 08-04-2012 05:47 AM
Try working with the WebWorks API documentation to get some pieces of source code to start working with the APIs. The easiest way to create a file download in BB10 is the new FileTransfer API and there is an example in the docs to get started.
08-04-2012 06:40 AM
can u please suggest me the code of file transfer for BB6 webworks..
I am working on a project in which i have to download the image to local folder and save the path in SQL database...
And i am checking the project in 9800 OS6.
Please help me...
Thanks & regards,
08-04-2012 06:59 AM
For BB SmartPhone OS 6/7 or PlayBook OS have a closer look to the WebWorks Community APIs, they created some great extensions to work with FileTransfer (FileDownload, FileUpload) almost the same way BB10 is working by default right now. The only difference between them using the extensions from WebWorks Community APIs seem to be the object the functionality for download files is assigned to. For SmartPhone/PB using the extension it is:
and using BB10 it is:
Give it a try. I already worked with BB10 FileTransfer API and also using it for PlayBook and it worked quite well so far for the simple use cases.
08-04-2012 07:29 AM
08-04-2012 08:05 AM
I go through this code.....but it is throwing exception. i.e " ReferenceError: Webworks is not defined ".
For usage read the samples provided, they should work in any way. When I was working with the extension on PlayBook I only copy+pasted the provided sample source code and changed the attributes for the function call:
// You need to define "remotePath", "localPath", "onProgress", "onError", "options" like shown in documentation
, localPath, onProgress, onError, options);
For BB SmartPhone OS the function call looks like this:
// You need to define "options" like shown in documentation
All think all informations provide there, try to follow and it should work.
08-06-2012 07:08 AM
08-06-2012 07:35 AM
Good to know it was a solution for you!
11-01-2012 05:00 AM
I am using ripple emulator to test my app, but it is throwing exception. i.e " ReferenceError: Webworks is not defined ".
I go through the document but still i coudn't fix it.
Platform: Webworks version 2.0
11-01-2012 05:09 AM
The above code didn't work in ripple.... you have to check your code in the simulator.. for which you have to set the sdCard path.
Thanks & Regards,