Skip to content Skip to sidebar Skip to footer

Prevent Step Counter From Returning To 0 On App Closed?

I have a simple step counter taken from Google (https://github.com/google/simple-pedometer/blob/master/src/com/google/android/apps/simplepedometer/SimplePedometerActivity.java). I

Solution 1:

You will have to look into local state persistence, Firebase is an online first suite. you can use Firestore Caching and rely on the cached version when offline, but it is highly recommended to look into local storage and updating your online presence infrequently.

Using local storage, you can handle real-time changes within your app and preserve any changes between the state when restarting or force closed by the user.

A few resources I was able to find:

Post a Comment for "Prevent Step Counter From Returning To 0 On App Closed?"