deanrobertcook / Android-ExpenseTracker

The Android client to keep track of all my expenditures
0 stars 0 forks source link

Recurring expenses #43

Open deanrobertcook opened 8 years ago

deanrobertcook commented 8 years ago

Allow users to put in recurring entries (i.e, daily, weekly, monthly etc). Provide a separate view for these recurring entries that the user can easily view and manage (like another full screen from the nav drawer).

Also allow the user to do this posthumously - that is, if they add a new monthly expense that started 12 months ago, then 12 entries will be generated immediately on the dates they specified.

When the recurring entry time arrives, the app should generate a system tray notification that allows the user to accept or reject the impending expense, or if they tap it, it should take them to the entry screen with the values auto-completed so that they can just modify the amount or perhaps the date.

MVP0:

deanrobertcook commented 8 years ago

Would need to create a BroadcastReceiver that creates a Service on boot. This Service would then need to determine if any alarms should fire for that day, and then set them (in fact, it would need to set all of the alarms in case the user doesn't turn off their device). Actually, I guess that's why the service is rescheduled to repeat the next day in this example: http://stackoverflow.com/questions/7568233/how-to-implement-yearly-and-monthly-repeating-alarms

The alarms would also need to be set once the user creates a recurring item, in case they should first go off before the Service is restarted again.

deanrobertcook commented 8 years ago

After working on this for a number of hours, I'm tempted to drop it from the launch milestone. The functionality will actually be quite fiddly. So far, I have a dialog that appears over a new page, but selecting different triggerTimes for different intervals will be quite tricky to do well.

Further more, there is still the question of selecting categories (and reusing the CategorySelectActivity) and also syncing the RecurringItems with the backend.

Might not be feasible to get done this weekend.