evollu / evollu/react-native-fcm
Notification handler err
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description

this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => {
// optional, do some component related stuff
alert(JSON.stringify(notif))
FCM.presentLocalNotification({
id: 1, // (optional for instant notification)
title: "My Notification Title", // as FCM payload
body: "dsaads", // as FCM payload (required)
sound: "default", // as FCM payload
priority: "high", // as FCM payload
number: 10, // Android only
ticker: "My Notification Ticker", // Android only
auto_cancel: true, // Android only (default true)
large_icon: "ic_launcher", // Android only
icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap
big_text: "Show when notification is expanded", // Android only
sub_text: "This is a subText", // Android only
color: "red", // Android only
vibrate: 300, // Android only default: 300, no vibration if you pass 0
wake_screen: true, // Android only, wake up screen when notification arrives
group: "group", // Android only
// picture: "https://google.png", // Android only bigPicture style
ongoing: true, // Android only
//my_custom_data:'my_custom_field_value', // extra data you want to throw
lights: true, // Android only, LED blinking (default false)
show_in_foreground // notification when app is in foreground (local & remote)
});
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.