[GSOC] Implemented Service to store Deck Meta Data#11487
Closed
prateek-singh-3212 wants to merge 7 commits into
Closed
[GSOC] Implemented Service to store Deck Meta Data#11487prateek-singh-3212 wants to merge 7 commits into
prateek-singh-3212 wants to merge 7 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request template
Purpose / Description
I am working on decoupling the notification ( currently It causes random notification triggring in our app). This PR also aims to solve the problem of tight coupling between notification and small widget.
Fixes
Fixes #8114
Fixes #6476
Approach
What is the issue?
The complete issue is documented in #6476. The main issue is that Current notification system is coupled with widget and notification is only triggered when user use widget.
Secondly, Notification is triggered when user is using the app. How? Whenever deck review completes the deck the widget data is updated Hence Notification is shown (Because it is tightly coupled).
Architectural: one "unit of work" per time, rather than per deck.
ALGO FOR DECK NOTIFICATION
Input: TreeMap<time, List>
We store the the time and list of decks whose notification needs to be send on that time.
The map is TreeMap which stores the data in sorted key form.
Working of algo:
ALGO FOR ALL DECK NOTIFICATION
All deck notification will work in the syncronization with above algo and addintion to this If Thier is no scheduled notification in next 1 hour then also work manager will run after 1 hour and check the all deck status.
How Has This Been Tested?
Tested on samsung galaxy M51(API 31)
Checklist
Please, go through these checks before submitting the PR.
ifstatements)