-
Notifications
You must be signed in to change notification settings - Fork 26
feat(ui): Initial basic push notifications #1410
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
base: develop
Are you sure you want to change the base?
feat(ui): Initial basic push notifications #1410
Conversation
254c028 to
275df0f
Compare
…tial-basic-push-notifications
|
We need to add this entry in the Apple requires a reason why the app needs to use notifications, sames as other protected resources like NSCameraUsageDescription. |
|
Things should be much simpler now @iFergal. Feel free to take a look when you have time. Next I will make some tests on how group notifications work. |
| (path: string, notificationId?: string) => { | ||
| window.history.pushState(null, "", path); | ||
| window.dispatchEvent( | ||
| new CustomEvent("notificationNavigation", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we make notificationNavigation a constant somewhere
| largeIcon: "res://drawable/notification_icon", | ||
| smallIcon: "res://drawable/notification_small", | ||
| iconColor: PRIMARY_COLOR, | ||
| channelId: "veridian-notifications", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I actually meant that the channelId should be a constant somewhere. We can still keep them as separate objects like you have though.
…tial-basic-push-notifications
| async getActiveNotifications(): Promise<LocalNotification[]> { | ||
| const result = await LocalNotifications.getPending(); | ||
| return result.notifications as LocalNotification[]; | ||
| this.profileSwitcher(profileId as string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we still don't know if this is a string, we can change line 149 to if (!notification.extra || typeof notification.extra.profile !== "string")
Pull Request: Add Push Notifications for Multi-Profile App
Description
After reviewing the push notification capabilities that Capacitor offers in this spike VT20-2077: Push notifications on the wallet, we will now move forward with implementing them in the app.
When users receive messages or updates for profiles they are not currently viewing, they will see a notification on their phone. This helps users stay connected without constantly checking the app.
Our app supports multiple profiles, like having separate accounts for work and personal use. Before this change, users would only see notifications inside the app when they were already using it. This meant they could miss important updates for other profiles. Push notifications solve this by alerting users even when the app is closed or in the background.
The system works like this:
Videos below will show:
Checklist before requesting a review
Issue ticket number and link
Testing & Validation
Design Review
Permission request when you launch the app (we will add the possibility to turn it on and off from the Settings in another task)
iOS
iOS.mp4
Android
Android.mp4