Also, is there a way to completely delete the records in the file?
call TinyDB1.ClearAll completely deletes the records.
"viewing a TinyBD and that it needs the phone to be rooted" ...you did not provide a link but that is certainly not a requirement for viewing the contents of a TinyDB. Load the TinyDB to a List or List of Lists and you can view the information in an HTML table or display. Simple? No. You need to coding a routine to show the elements that are in the TinyDB, put them in a list and display them in a label, html table (see below) or in a series of labels; in fact you can make a pseudo spreadsheet by using a Table component and labels though that would be awkward.
See Taifun's Dynamic Table Layout ... http://puravidaapps.com/ table.php His example uses csv files, but the input could be from a list.
Another way would be to send the contents of the TinyDB to create a csv file...again, you will need some creative coding. You will be able to view the contents of the TinyDB as a csv file. How do you do that? Lots of ways, be creative.
=====
Lists
List of Lists
TinyDB
ABG's example https://docs.google.com/ document/d/ 12t4HLNRepCnbmcfycdF8wSHWht_ D1P8hKJpTknVDChY/edit demonstrates filtering
Stephen's example https://sites.google.com/ site/stevozip/home/AI2/tinydb
Did this help?
correct, to be able to view TinyDB, which is actually an XML file, you need root access, but to view the data, first get the tags and then loop through the tags to get their values, see also the documentation http://ai2. appinventor.mit.edu/reference/ components/storage.html#TinyDB
Return a list of all the tags in the data store
Retrieve the value stored under the given tag. If there's no such tag, then return valueIfTagNotThere.
any GetTags()
any GetValue(text tag, any valueIfTagNotThere)
Once again you guys rock!
This is a big project and AI2 has been able to handle it just fine. I am sure I could do things better but for now it's working.
This is a big project and AI2 has been able to handle it just fine. I am sure I could do things better but for now it's working.
댓글 없음:
댓글 쓰기