This is a migrated thread and some comments may be shown as answers.

Save image to SD Card from a URL !

4 Answers 145 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Maxim
Top achievements
Rank 1
Maxim asked on 29 Aug 2012, 08:05 PM
I need same working button like in the link below for saving images from a url >
http://android-er.blogspot.com/2010/07/save-file-to-sd-card.html
Thanks.

4 Answers, 1 is accepted

Sort by
0
John Wahlen
Top achievements
Rank 2
answered on 30 Apr 2013, 02:00 PM
I've been working on the same problem.  The biggest thing is you can save a file to the SD card but only text files.  The only way to do it currently is with a plugin but since Icenium doesn't allow custom plugins we are stuck.  Unless someone else has information that I'm missing. 
0
Kristian D. Dimitrov
Telerik team
answered on 01 May 2013, 03:48 PM
Hi John,

 Saving images from a URL is possible using the Cordova File API's Filterable object. You can read more about it here. We prepared a small sample for downloading an image using FileTransfer here.

Regards,
Kristian D. Dimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
0
John Wahlen
Top achievements
Rank 2
answered on 01 May 2013, 08:15 PM
How about saving a canvas image to a file.  This is where I'm having the issue. 
0
Kristian D. Dimitrov
Telerik team
answered on 06 May 2013, 09:33 AM
Hi John,

You can use this JavaScript canvas library. Their canvas object has ".toSVG()" method, which will return a string with the content you need for the file. Then you can use the Cordova File System API to create a file and write its content.

All the best,
Kristian D. Dimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
Tags
Apache Cordova
Asked by
Maxim
Top achievements
Rank 1
Answers by
John Wahlen
Top achievements
Rank 2
Kristian D. Dimitrov
Telerik team
Share this question
or