Saving video/photos in chronological order

31 views
Skip to first unread message

K Campbell

unread,
Aug 29, 2015, 7:58:37 PM8/29/15
to AndroidScript
Hello,
I've been searching for an example of saving videos/images in chronological order. As far as the examples show, one file overwrites the next file. How, exactly, can I name each new file with the date & time, down to the second, like the default android camera app?
Any help will be appreciated..

Thank you

Steve Garman

unread,
Aug 30, 2015, 1:01:56 AM8/30/15
to AndroidScript
I use something like this

    var savfolder = "/sdcard/myapps/myphotos/"; 
    app.MakeFolder(savfolder);
    //...
    var savname = (new Date).toISOString().slice(0,19 );
    savname = "ds_"+savname.replace(/[-:]/g,"");
    savname =  savname.replace(/T/,"_");
    var file = savfolder+savname+".jpg";
    app.Alert(file);
Reply all
Reply to author
Forward
0 new messages