We then schedule two months worth of notifications from flutter, when the app is launched, or when a new declaration occured.
🏁PREREQUISITES
[x] DOR
[ ] DOD
📜CONTEXT (User Story)
As a user
I want to receive a daily notification only if i am not already declared
In order to not forget to declare me
🪳STEPS TO REPRODUCE
Step 1: Connect to mobile app before 9 a.m
Step 2: Do your daily declaration
Step 3: Leave the app
Step 4: Wait to receive a notification around 9 a.m
🪜STEPS FOR A FIX
Swift
[x] Step 1: Create a new Swift method in the channel:
scheduleNotificationSwift(timestamp: String, title: String, message: String) With the timestamp following ISO8601
[x] Step 2: Create a new Swift method in the channel:
cancelAllNotificationsSwift()
[x] Step 3: Create a method on the Flutter Side that is triggered on launch (and on declarations) which executes the following pseudocode:
[x] Additional Step: Exclude public holidays in metropolitan France.
cancelAllNotificationsSwift()
declaredDates <- getDeclaredDates() // from repo
for i <- 1..60
currentDay <- addDays(today(), i)
if currentDay in declaredDates
continue
timestamp <- timestampFrom(addHours(currentDay, 8))
scheduleNotificationSwift(timestamp, title, message)
Kotlin
[x] Step 4: Create a new Kotlin method in the channel:
scheduleNotificationKotlin(timestamp: String, title: String, message: String) With the timestamp following ISO8601
[ ] Step 5: Create a new Swift method in the channel:
cancelAllNotificationsKotlin()
[ ] Step 6: Modify the flutter method to conditionally use the correct platform
if Platform.isAndroid
cancelAllNotificationsKotlin()
if Platform.isIOS
cancelAllNotificationsSwift()
...
if Platform.isAndroid
scheduleNotificationKotlin(...)
if Platform.isIOS
scheduleNotificationSwift(...)
✅ACCEPTANCE CRITERIA
⛔Notification doesn't appear a day where the user have done his declaration
📛BLOCKERS
🟢 It seems that we miss an Apple computer to be able to do the iOS part. => Loucas will help us
🟢 Waiting for #1507 Done
🟢 Waiting for #1438
🗒️NOTES
Currently we receive a notification everyday at 9 o clock. But if we do our declaration at 8 o clock we want to not have any notification.
In order to achieve this result, we expose native methods that we will create in Swift and Kotlin
We then schedule two months worth of notifications from flutter, when the app is launched, or when a new declaration occured.
🏁PREREQUISITES
📜CONTEXT (User Story)
As a user
I want to receive a daily notification only if i am not already declared
In order to not forget to declare me
🪳STEPS TO REPRODUCE
🪜STEPS FOR A FIX
Swift
scheduleNotificationSwift(timestamp: String, title: String, message: String)
With the timestamp following ISO8601cancelAllNotificationsSwift()
Kotlin
scheduleNotificationKotlin(timestamp: String, title: String, message: String)
With the timestamp following ISO8601cancelAllNotificationsKotlin()
✅ACCEPTANCE CRITERIA
📛BLOCKERS
🟢 It seems that we miss an Apple computer to be able to do the iOS part. => Loucas will help us
🟢 Waiting for #1507Done🟢 Waiting for #1438🔍AFFECTED COMPONENT(S) (Scope)
⛓️LINK TO OTHER ISSUES
🪟SCREEN SHOTS & MOCKUPS