skip navigation
All Products
Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
NEW
: Design Kits for Figma
Online Training
Document Processing Library
Embedded Reporting for web and desktop
Web
Kendo UI
UI for jQuery
UI for Angular
UI for React
UI for Vue
UI for Blazor
UI for ASP.NET Core
UI for ASP.NET MVC
UI for ASP.NET AJAX
Mobile
UI for .NET MAUI
UI for Xamarin
Document Management
Telerik Document Processing
Desktop
UI for .NET MAUI
UI for WinUI
UI for WinForms
UI for WPF
Reporting & Mocking
Telerik Reporting
Telerik Report Server
Telerik JustMock
Automated Testing
Test Studio
Test Studio Dev Edition
CMS
Sitefinity
UI/UX Tools
ThemeBuilder
Design System Kit
Debugging
Fiddler
Fiddler Everywhere
Fiddler Classic
Fiddler Jam
FiddlerCap
FiddlerCore
Extended Reality
UI for Unity XR
Free Tools
JustAssembly
JustDecompile
VB.NET to C# Converter
Testing Framework
View all products
Demos
Services
Blogs
Docs & Support
Pricing
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
This is a migrated thread and some comments may be shown as answers.
Save As - Button
3 Answers
80 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
27 Aug 2012,
07:59 PM
How to save the image from a URL to SD card > onclick button "save " ? I found a lot of phonegap code but i need to do it in icenium, please help
3 Answers
, 1 is accepted
Sort by
Score
Date
0
neven
Top achievements
Rank 1
answered on
30 Aug 2012,
11:57 AM
Hi,
Below is an working example how to write to file system (sd card). This doesn't cover fully your question but is a good starting point:
<!DOCTYPE html>
<html>
<head>
<title>FileWriter Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
}
function gotFS(fileSystem) {
console.log(fileSystem.root.fullPath);
fname="IceActionLog.txt";
console.log("Full Path Name is " + fname);
fileSystem.root.getFile(fname, {create: true, exclusive: false}, gotFileEntry, fail);
}
function gotFileEntry(fileEntry) {
fileEntry.createWriter(gotFileWriter, fail);
}
function gotFileWriter(writer) {
writer.write("This is written on onDevice ready.");
}
function fail(error) {
console.log(error.code);
}
</script>
</head>
<body>
Testing onDeviceReady - writning to the file system
</body>
</html>
0
Criulean
Top achievements
Rank 1
answered on
04 Sep 2012,
05:15 PM
Neven Thank you for your response but how to use this code for a button <a> ?
0
sdobrev
Top achievements
Rank 1
answered on
05 Sep 2012,
11:37 AM
Hi Criulean,
You can use the click event of a kendo Button for this functionality.
Here
is the online reference for this.
Here
you can find an example which have source code.
Hope this helps.
Tags
Apache Cordova
Asked by
Maxim
Top achievements
Rank 1
Answers by
neven
Top achievements
Rank 1
Criulean
Top achievements
Rank 1
sdobrev
Top achievements
Rank 1
Share this question
or
Copy link