-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[expo-notifications] Add notification building infrastructure #6843
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
Merged
sjchmiela
merged 14 commits into
master
from
@sjchmiela/expo-notifications-buildingnotifications
Feb 13, 2020
Merged
[expo-notifications] Add notification building infrastructure #6843
sjchmiela
merged 14 commits into
master
from
@sjchmiela/expo-notifications-buildingnotifications
Feb 13, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c663647
to
089b190
Compare
f1be211
to
d9cf860
Compare
001e271
to
3f61daf
Compare
mczernek
approved these changes
Feb 3, 2020
bbarthec
approved these changes
Feb 4, 2020
esamelson
reviewed
Feb 5, 2020
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.
this looks good, i have a few comments about functionality that would be great to add, but if they are already addressed in one of your newer PRs i haven't looked at yet, i apologize!!
.../expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java
Outdated
Show resolved
Hide resolved
.../expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java
Show resolved
Hide resolved
packages/expo-notifications/ios/EXNotifications/Building/EXNotificationBuilder.m
Outdated
Show resolved
Hide resolved
cc1e2a1
to
108dbdb
Compare
esamelson
reviewed
Feb 12, 2020
.../expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java
Outdated
Show resolved
Hide resolved
.../expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java
Outdated
Show resolved
Hide resolved
…actory NotificationBuilderFactory provides with NotificationBuilders objects capable of configuring NotificationCompat.Builder instances according to configuration passed in with setNotificationRequest(JSONObject) and setBehavior(NotificationBehavior)
…nd" and "vibrate"
108dbdb
to
13751cd
Compare
esamelson
approved these changes
Feb 13, 2020
13751cd
to
25135fd
Compare
7 tasks
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.
Why
We want to have a way to build notifications based on some requests, eg. from
presentNotificationAsync({…})
, or from adata
property of aRemoteMessage
.How
NotificationBuilderFactory
providesNotificationBuilders
capable of configuringNotificationCompat.Builder
instances according to configuration passed in withsetRemoteMessage(RemoteMessage)
.This is the class we will extend (and eventually refactor if it gets too complicated, eg. into the Modifiers scheme) to support more fields from the notifications object to set
Intent
s, links, number etc.More complete architecture diagram (receiving + handling + building)
Test Plan
I have confirmed these classes work as expected in a more complex PR.