• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to make android app keep progress after re-launching?? (HTML/CSS/JAVASCRIPT)

GARRUS

Lurker
Feb 19, 2017
3
1
I am using PhoneGap/Cordova to make the application.
It's a very simple app, Its 30 days workout. So its your first day, you will click on Day 1, it will open a new page with tasks.

When you are done with the task, you will check off the checkbox next to it and it goes green.
Then tomorrow if the task is over, day 2 will be unlocked.

Now, the problem is, I don't know how can I save the progress after the app is closed? If I re-enter the app, checked off boxes will be unchecked.
I was thinking if its possible to do it with cookies somehow?

Anyway, any suggestion will be appriciated. Thank you.
 
The easiest way to do this is by using SharedPreferences. You could save the day number as a key/value pair. Just a simple integer value.

https://developer.android.com/training/basics/data-storage/shared-preferences.html

I am sorry for the newbie question but what language is this?
I can use shared preferences even though im coding this with html/css/javascript?

I was also looking into maybe trying to save progress with cookies or cordova storage but i dont know what is the best option.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones