Reputation: 441
My app should trigger the function "dayChange()" whenever one of the two cases is true:
"dayChange()" puts a new object in a list and saves that list to my instance of shared preferences.
What I need: I'm not aksing for a complete solution (hence no code), but some basic understanding and a direction to Google in.
Where I am at right now: I'm close to a solution for 1. I save DateTime.now() and load it via SharedPreferences everytime the app is opened. I then check if the day has changed. I'm not quite sure how to handle resuming yet, but I'm confident I can figure it out by googling life cycle stuff.
For 2 things get more complicated.
What are good approaches to this? I'm willing to dig deeper to solve the issue, but I don't want to go on a wild goose hunt without knowing a goose is what I actually need.
Upvotes: 3
Views: 1281