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

Added Notification feature #579

Closed
wants to merge 20 commits into from

Conversation

Ashutoshgupta22
Copy link

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.

The code doesn't currently seem to build, so I can't do a deeper review, but I noticed these issues already

app/src/main/AndroidManifest.xml Outdated Show resolved Hide resolved
app/src/main/res/layout/loyalty_card_edit_activity.xml Outdated Show resolved Hide resolved
app/src/main/res/layout/loyalty_card_edit_activity.xml Outdated Show resolved Hide resolved
app/src/main/res/layout/number_picker_dialog_layout.xml Outdated Show resolved Hide resolved
app/src/main/res/values/font_certs.xml Outdated Show resolved Hide resolved
app/src/main/res/values/preloaded_fonts.xml Outdated Show resolved Hide resolved
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.

Some more little things

app/src/main/java/protect/card_locker/Notification.java Outdated Show resolved Hide resolved
app/src/main/res/layout/loyalty_card_edit_activity.xml Outdated Show resolved Hide resolved
app/src/main/res/layout/number_picker_dialog_layout.xml Outdated Show resolved Hide resolved
app/src/main/res/layout/loyalty_card_edit_activity.xml Outdated Show resolved Hide resolved
app/src/main/res/layout/loyalty_card_edit_activity.xml Outdated Show resolved Hide resolved
@TheLastProject
Copy link
Member

Found some more little things.

By the way, this should move to the database at some point. Do you want me to try to teach you how to do that or would you rather I write the database parts myself? I don't know if you are contributing because you want this feature in Catima or because you want to learn more Android development, so I don't want to make you do more work unless you want to :)

@Ashutoshgupta22
Copy link
Author

Ashutoshgupta22 commented Nov 13, 2021

I am working on it.👍

@Ashutoshgupta22 Ashutoshgupta22 marked this pull request as draft November 14, 2021 13:16
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.

The base code looks mostly okay (although it wouldn't hurt to run "Reformat code" in Android Studio).

There are several issues reported by SpotBugs though, you can run it yourself locally or download the check results from GitHub CI:

  1. Press Details
    image
  2. Press Summary
    image
  3. Scroll down and download test-results
    image

Aside from that, time to switch to the DB stuff? You should probably create something similar to groups so that one card could have multiple alarms. So, define a LoyaltyCardDbAlarms and LoyaltyCardDbIdsAlarms class and add it to onCreate. Then you also want to increase DATABASE_VERSION and add something to the onUpgrade to also create the new tables when users upgrade from an old version (onCreate is only ran during a clean install).

After that we also need to make sure import/export of that works, but let's do the DB part first :)

@TheLastProject
Copy link
Member

Hey, I haven't heard about this PR for a while so I'll close it to keep the PR list clean. If you ever want to finish this, feel free to reopen. Thanks for your help :)

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