JQM Database Foreground/Background

JQM Database Foreground/Background

Hi, is it possible when using JQM to do the following.

On the launch of my JQM app it calls a function to create a HTML5 Database if one isn't detected.  What code would I use to ensure this is checked each time the app is active.

For example if the user were to place the app in the background and then delete all browsing data/history etc, and then brings my app back into the foreground what code would I run so that I could check the DB was still there - as in the example I have just mentioned it would need to be constructed again.

Thanks.