Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding notification feature #497

Conversation

Ashutoshgupta22
Copy link

@Ashutoshgupta22 Ashutoshgupta22 commented Oct 16, 2021

Hey! please review the changes.

Resolves #410

Copy link
Member

@TheLastProject TheLastProject left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, it definitely does work after your last fix. Pretty cool!

I see a few issues though:

  1. The alarms are saved to SharedPreferences, I'd much rather see these included in the database so we can export/import them. That way if people switch to another device they won't lose their reminders.
  2. Setting an exact date and time for each notification seems a bit too much. I think it would be much nicer to instead have an option in settings for "Reminder time", defaulting to something like 9:00 AM, so it is very easy to set all the reminders to a time of day that fits your schedule best.
  3. I think it would be much nicer UI to instead of the checkbox and date thing, have an Android calendar-style thing where you click "Add reminder" and add multiple reminders:
    image
    (Of course, "10 minutes" would not be a valid option. It'd be more like entering the amount of days in advance, we could just use a input field for that so people can enter anything from 1 through whatever high number they'd like)

@Ashutoshgupta22
Copy link
Author

Thanks!

  1. I agree , it will be better to save the date and time in the database .But it will take some time as I have to learn more about SQLite.

  2. Yeah, I too ,thought about using this UI . but I think as a user I would save different types of cards like for shopping , restaurants and I would want to get reminders for each of them at a time when I can use that card . For example ,
    if I have to go to a restaurant on next Sunday at 8pm ,( it will be much easier to set that with a calendar and I would not have to calculate the no. of days ), I will get that notification at the perfect time , rather than getting that notification on that morning and have to keep in my mind all day. It gives more options to the users.

@TheLastProject
Copy link
Member

  1. Fair. Let's first focus on the other changes so we have one good consistent plan here. After that I'm sure I can help guide you with how the DBHelper.java class works :)

  2. I understand where you're coming from, but for most cards/coupons knowing "oh, I only have a week left to spend this" is more useful. What about creating a dialog where you can scroll to the amount of days you want, and then below that it shows what date that would be?

Very quick mock-up:
image

@Ashutoshgupta22 Ashutoshgupta22 marked this pull request as draft October 17, 2021 16:00
@Ashutoshgupta22
Copy link
Author

  1. Okay , cool.👍

  2. Yes , I like that . I will start working on it. So , should I replace the checkbox and date thing with this dialog or should I add this in the settings ?

  3. And I think the max. no. of days that can be selected should be 365 , more than that would be absurd.

@TheLastProject
Copy link
Member

  1. Please replace the checkbox with an "Add reminder" button, which opens that dialog which first asks how many days in advance and then the desired time of the alert. We can then put a X to the right of the reminder to remove the reminder again. We can start with only supporting a single reminder per card, but maybe later extend it to allow multiple reminders like how Android calendar allows.

  2. Agreed, 365 is a very logical maximum, let's go for that :)

@Ashutoshgupta22
Copy link
Author

Sure , let's do that .

@Ashutoshgupta22
Copy link
Author

Screenshot 2021-10-19 at 3 58 41 PM

Screenshot 2021-10-19 at 3 59 17 PM

Is this okay?

@TheLastProject
Copy link
Member

That looks awesome! I'd personally put the "Add reminder" button below all existing reminders and put a "Reminders" text above it so it is clear the next stuff in the app is a list of reminders, but you definitely made an awesome UI there!

@Ashutoshgupta22
Copy link
Author

Thanks ! :)

I think keeping "Add reminder" button above the reminders will make it easier to add a reminder when there are multiple
of them , so I will not have to scroll it all the way down . And I will put a text saying "No reminders added." in place of the cardView , below the "Add reminder" button, which will make it clear that the reminders will be shown there.

But I can change it ,if you want.

@TheLastProject
Copy link
Member

I would personally strongly prefer putting the text "Reminders" on top and the "Add reminder" button on the bottom because:

  1. You don't need a "No reminders added." text, it is obvious because there is nothing between the title and the button.
  2. You first see all your reminders before being asked to add one, which I consider a feature, because it allows you to see "Oh, I already have a reminder for 1 week before, don't need to add another one" which would take more scrolling if the "Add reminder" button was above. It seem to me that it would be very rare to want to add an extra reminder without first seeing what reminders you currently have.

So, that would be this layout:

Reminders
---------
<Reminder 1> X
[Add reminder]

@Ashutoshgupta22
Copy link
Author

Yeah , you are right . I will change it .

@Ashutoshgupta22
Copy link
Author

Screenshot 2021-10-19 at 7 28 08 PM

Screenshot 2021-10-19 at 7 29 50 PM

Will this work?

@TheLastProject
Copy link
Member

I would remove the spacing above the "Add reminder" button but otherwise yes, perfect :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification before expiry date
2 participants