Lydia : Database or JSON?
In DroidScript, there is a native SQlite function. But there is no JSON writing or parsing function.
function test(display)
{
// file to store data
var fil="/storage/jsontest.txt";
//build a test object
var stuff1 = {"value":1,"name":"one"};
//save object in a file
writeAsJson(fil,stuff1);
//get copy of the object from the file
var newobj = readAsJson(fil);
//display data from the copy
display.SetText(newobj.name +" is "+ newobj.value);
}
As usual I have set myself a larger project than I can realistically handle. But I have time to pick away at this until it's done. So I'm moving forward. Today's progress was mostly reproducing the work I did in Tasker, and a little bit trying to write JSON. Tomorrow I might see what it's like working with databases. I do remember a little bit of db stuff... I think...
Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!
Reply !stop to disable the comment. Thanks!
Congratulations @baerdric! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Award for the number of posts published
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard: