Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Pass variable from WebView to a Controller

$
0
0

Hi, i just have a problem, i have a WebView with some events, the event "save" saves an entire canvas like this:

WebView

var dataURL = canvas.toDataURL();
I use this canvas to write with my finger, the method toDataURL() makes an image from the canvas, so now i need to save that value dataURL in my File System, so any ideas?

So, the main idea, is to pass the variable dataURL, who is inside a WebView to my controller, thanks for your time.

I know this code is for saving the file in the file system.

var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, "filename");

Viewing all articles
Browse latest Browse all 7655

Trending Articles