androidzin / ponto-pro

Tenha seu banco de horas na palma de sua mão. Dê adeus aos comprovantes.
1 stars 1 forks source link

Today Entity #5

Open sauloaguiar opened 11 years ago

sauloaguiar commented 11 years ago

Create an entity to maintain the current workday information [ checkins / worked hours ] and store on shared preference. Should check when the entity is outdated.

Restore saved state from shared preferences when application is started again

sauloaguiar commented 11 years ago

@brunomateus I'm not sure about how to deal with this feature. There are two options, once the user has done a checkin

  1. save it into database.
  2. save on today object and persist on shared preferences. At the end of day, the data will be transferred to database.
brunomateus commented 11 years ago

@sauloaguiar I think the best way is: Always save on sharedPreference when user goes out of the application. Save on database, when the workday is complete(make leaving checkin) or on a new day, just before start it (examaple: user forgot to make a leaving checkin, so today is open).