RMET-1240 H&F Plugin - Implement Notification Frequency (waiting period) on Android #49
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.
Description
This PR adds the implementation of the NotificationFrequency, also known as waiting period, on Android.
For NotificationFrequency equal to SECOND or MINUTE, we always wait for the next full SECOND / MINUTE to pass before sending another notification. For the rest of them, like HOUR and DAY, we only wait for the beginning of the next time unit. For example, if we send a notification at 4:55PM and at 5:00PM we have a new notification to be sent, we will send it, because we are in a new hour. On the other hand, if the frequency is MINUTE and we send a notification at 4:55PM and 30 seconds, we will wait until 4:56PM and 30 seconds to send a new notification.
This PR also includes the work done by @nflsilva regarding the Migration of the Room database, since we added some new values to the BackgroundJob table.
Context
References: https://outsystemsrd.atlassian.net/browse/RMET-1240
Type of changes
Platforms affected
Tests
Tested locally on Android 11. Tested all possible NotificationFrequency values. Also built with MABS 8 and MABS 7.2.
Screenshots (if appropriate)
Checklist
RNMT-XXXX <title>