Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How can I set notification sound when app is not running in React-Native firebase

$
0
0

I'm trying to make notification ringing when app is not running in IOS.

Here is my code.

  this.notificationListener = firebase.notifications().onNotification((notification: Notification) => {    // SET SYSTEM DEFAULT SOUND!    notification.setSound("default");    firebase.notifications().displayNotification(notification);  });

When app is in background or foreground ( Maybe I can say 'app is running'), notification rings well.

Should I need to use other listener?Or should I need to add my own sound file for ringing?


Viewing all articles
Browse latest Browse all 16750

Trending Articles