everyone. I am a new beginner to Android. I design an app mainly driven by javascript by following this youtube video.
My asset folder:

I put my css, html and js and image folder together in the asset folder and everything runs fine. Now I want to go one step further that I want my app can:
1.) check if there is any file in the app that had stored data. If no, create a new file and input default data (simply string and number). If yes, check the data in the file and run javascript according to the data stored. For example, if "1" is stored, run frunjavascript "first.js" and javascript "second.js" if "2" is stored.
2.) store some simple data(not a not, simply string and number) when I use my app automatically WITHOUT clickng any button. That means I don't want to click a "save" button when storing data. The app stores data itself when I use it.
3.) replace all the data with default data (that means return back to initial state) when I click a button designed in HTML.
Can I perform it purely by Javascript? Or I shall cooperate javascript with Android?
I searched in google and what I found is simply driven Android. My problem is as my app is mainly javascript, what shall I do when dealing with data (It is impossible to rewrite the whole app mainly driven by Android for me as the whole javascript is very complicated)? If possible, I wish the 3 steps I listed above can be done by purely javascript.