Skip to content

Commit

Permalink
chore: add example for getTitle method (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naturalclar authored Jul 21, 2020
1 parent 34b4b28 commit 3d6f5a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const App = () => {
alert: 'Sample notification',
badge: '+1',
sound: 'default',
alertTitle: 'title',
category: 'REACT_NATIVE',
'content-available': 1,
},
Expand Down Expand Up @@ -121,7 +122,9 @@ export const App = () => {
};

const onRemoteNotification = (notification) => {
const result = `Message: ${notification.getMessage()};\n
const result = `
Title: ${notification.getTitle()};\n
Message: ${notification.getMessage()};\n
badge: ${notification.getBadgeCount()};\n
sound: ${notification.getSound()};\n
category: ${notification.getCategory()};\n
Expand All @@ -138,7 +141,8 @@ export const App = () => {
const onLocalNotification = (notification) => {
Alert.alert(
'Local Notification Received',
'Alert message: ' + notification.getMessage(),
`Alert title: ${notification.getTitle()},
'Alert message: ${notification.getMessage()}`,
[
{
text: 'Dismiss',
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ PODS:
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- ReactCommon/callinvoker (= 0.62.2)
- RNCPushNotificationIOS (1.2.2):
- RNCPushNotificationIOS (1.3.0):
- React
- Yoga (1.14.0)
- YogaKit (1.18.1):
Expand Down Expand Up @@ -453,10 +453,10 @@ SPEC CHECKSUMS:
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
RNCPushNotificationIOS: 4c97a36dbec42dba411cc35e6dac25e34a805fde
RNCPushNotificationIOS: d5fd66aed4e03c6491ca0c6111a03d4f6455ff6c
Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: fe0bcbd52826c4d7c0dd4aa1c136e663b1ff0615

COCOAPODS: 1.8.4
COCOAPODS: 1.9.1

0 comments on commit 3d6f5a2

Please sign in to comment.