TinyDB is used to store persistent data directly on the Android device; this is useful for highly personalized apps where the user won’t need to share her
data with another device.
You may find yourself using a common prefix for the key. For example, TAG_TOTAL_May2014 or TAG_TOTAL_APR2014. In these cases, the common prefix TAG_TOTAL is used.
Above is a common coding practice used to store related data. For this, you may also find yourself needing to clear ALL data that contain the related data. For example, clearing all data that start (or contain) TAG_TOTAL. To accomplish this, you can use the following:
- The GetTags, returns a list of all TinyDB tags.
- The “for each” is used to loop through the list and for each iteration, assigns the next TinyDB tag to the variable item
- Next the if control statement is used to test and see if the item (database tag) contains the prefix (or the text) that we are looking for.
- If it does, we use ClearTag to clear or database tag
Looking for AiLiveComplete? See here: http://Amerkashi.Wordpress.com/news