-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Setup push notifications #424
Merged
Merged
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
3ce3814
setup airship in RN, iOS, Android
roryabraham deab109
port code from BrowserNotifications to Notification/index.js
roryabraham 9ac89a5
export enableUserNotifications and call it in Expensify::componentDid…
roryabraham f4b3617
isClientTheLeader is a promise
roryabraham 42ce96a
Merge branch 'master' into Rory-PushNotifications
roryabraham 7714a1c
revert react-native-notification libary add and remove blank file
roryabraham 9dbe08e
update browser notifications to match master
roryabraham f93400b
merge master into Rory-PushNotifications
roryabraham 4a98da3
got it running on a physical device
roryabraham 1572e4d
present notifications in the foreground on iOS
roryabraham 4bae637
bump deployment target back to iOS 11, it was necessary
roryabraham 6acfdc8
separate out browser notifications from push notifications
roryabraham 8b8e20f
setup push notifications in separate module
roryabraham 866d8dd
register/deregister for push notifications on signin/signout
roryabraham 8103e06
Setup listeners and action binding for push notifications
roryabraham 67820ac
rename browser notifications to localnotifications
roryabraham 54f9cbc
ignore push notifications if app is in the foreground
roryabraham d2d20d2
Merge branch 'master' into Rory-PushNotifications
roryabraham 5bf7eaf
merge master into Rory-PushNotifications
roryabraham cfed894
fix merge error
roryabraham d7292dd
fixed issues with Ion.clear()
roryabraham 90f7a44
Merge branch 'master' into Rory-PushNotifications
roryabraham 26b7b7c
fix Ion.clear to never pass object key to AsyncStorage
roryabraham 16a9ef3
fix JS style
roryabraham b58ff7d
reconfigure iOS push notifications
roryabraham 1d181ae
fix Ion.clear, for real this time
roryabraham 28809b1
add console debug for subscribing/unsubscribing from push notifications
roryabraham 29a4599
success, receiving push notifications through our API and cli tools
roryabraham e4016e7
setup callbacks for notificationResponse events as well as PushReceived
roryabraham 2243eaf
only setNamedUser if accountID has changed
roryabraham e5477c8
update exports in index.js as well as index.native.js
roryabraham 1326414
use multiRemove instead of clear
roryabraham ea04e7a
get rid of unnecessary second finally
roryabraham 9f2cf11
clean up constants
roryabraham f1b7992
lift Ion.connect to module top-level
roryabraham a51a9d7
simplify Ion.clear()
roryabraham 5976aef
merge master into Rory-PushNotifications
roryabraham c24ee99
use register and deregister instead of Ion.connect
roryabraham b069751
test and clean up push notification registration
roryabraham 15bc4e5
rebuild project to fix bad merge
roryabraham 93fb232
got basic android notificaitons showing up
roryabraham 221ddb8
simplify promise chain and remove second call to AsyncStorage.clear
roryabraham 70c1c33
merge master into Rory-PushNotifications
roryabraham 1dd1ad4
Merge branch 'master' into Rory-PushNotifications
roryabraham e760d20
make android push notifications pretty
roryabraham ed2ef62
fix ion clear
roryabraham a7f8bbb
revert/simplify changes to BrowserNotifications
roryabraham 3ecd752
clean up event binding
roryabraham e64fe75
clean up constants
roryabraham 5ae956f
remove unnecessary call to PushNotification.register
roryabraham bea5156
clean up console debugs
roryabraham ffa7192
clean up callback handler
roryabraham 22ca23c
add comments and nix Ion.clear changes
roryabraham 4416772
remove unnecessary object copy in bind
roryabraham f783f3d
use lodashGet instead of optional chaining
roryabraham 1ba6496
add note about callback overwriting
roryabraham 95818a5
return promise from Ion.clear
roryabraham 7645985
use || instead of ??, and add comment
roryabraham 105fb11
update comment on opt-in status
roryabraham 7f0915c
Merge branch 'master' into Rory-PushNotifications
roryabraham a226e40
move PushNotification.register, update comment, fix redirection
roryabraham e721350
Open to correct report
roryabraham 7e1402e
Merge branch 'master' into Rory-PushNotifications
roryabraham 3ddecd4
fix bad merge
roryabraham 8d26246
refactor to use props instead of state
roryabraham c7ef42e
Merge branch 'master' into Rory-PushNotifications
roryabraham 0c80e86
fix bad merge
roryabraham a6ef943
rename hamburgerShown prop to sidebarShown
roryabraham 3aa3db9
use actions instead of ion
roryabraham e01231b
rename prop to match ion key
roryabraham 0bcc2e9
get rid of unnecessary check in componentDidUpdate
roryabraham 4048e53
Merge branch 'master' into Rory-PushNotifications
roryabraham 7661304
get rid of isCompletedAnimation flag and fix issue with desktop load
roryabraham fd2a44a
add method doc and remove redundancies
roryabraham 7321830
move setupEventListeners into register
roryabraham 9eb0598
revert desktop changes and fix android bug
roryabraham 479b045
fix desktop initial render bug and signin/signout bug
roryabraham 6e0665c
improve debug logs and move deregister
roryabraham 6b8b7d6
Merge branch 'master' into Rory-PushNotifications
roryabraham 344343f
clean pods (but leave manual signing
roryabraham a1a1c35
Merge branch 'master' into Rory-PushNotifications
roryabraham b49e7d4
remove native import bug
roryabraham 27553a9
allow notification response callbacks when app is in foreground
roryabraham 60865d7
try to fix bad merge
roryabraham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
developmentAppKey = uulSSfTDQJ2r0PMpjRrhmQ | ||
developmentAppSecret = D4Bhf0HrQEehrPua74Tyiw | ||
|
||
productionAppKey = 55vypj0ARc6cN09MX7ogtQ | ||
productionAppSecret = EsSaqbdLSvmyC6kSBFJCtQ | ||
|
||
# Notification Customization | ||
notificationIcon = ic_notification | ||
notificationAccentColor = #2EAAE2 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>detectProvisioningMode</key> | ||
<true/> | ||
<key>developmentAppKey</key> | ||
<string>uulSSfTDQJ2r0PMpjRrhmQ</string> | ||
<key>developmentAppSecret</key> | ||
<string>D4Bhf0HrQEehrPua74Tyiw</string> | ||
<key>productionAppKey</key> | ||
<string>55vypj0ARc6cN09MX7ogtQ</string> | ||
<key>productionAppSecret</key> | ||
<string>EsSaqbdLSvmyC6kSBFJCtQ</string> | ||
</dict> | ||
</plist> |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Do we need this check if we're adding google-services.json to the project?
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 file is output by the RN build process - I wouldn't mess with it unnecessarily. Besides, Android push notifications won't work without google-services.json