evollu / evollu/react-native-fcm

Notification handler err

Open
#774 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.7k
Forks
661
PR merge metrics
No merged PRs in 30d

Description

![screenshot_1517848352](https://user-images.githubusercontent.com/27488285/35816445-c914a5e6-0aab-11e8-890f-9c8a67190bb9.png)

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.