Skip to content

chore: add example for getTitle method #158

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
merged 1 commit into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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