How to clear TinyDB values when app is closed

Hi, I am a beginner. I wanted to know how can I code the blocks the way that when user closes the application, all tiny DB values are cleared.

Yes you can by using call TinyDB.ClearAll block


for example


Hello MicroAI2

Snag is, if the User exits via the device Home Button, TinyDb will not be cleared. So I suggest you clear TinyDB on App Start-up instead.


alternatively use the tools extension and its ActivityStateChanged event

if state = pause
then clear TinyDB


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Oh, Ya! Thanks @ChrisWard

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.