react-native-push-notification 自定义音频

安装react-native-push-notification

在项目下添加自定义音频
react-native-push-notification 自定义音频_第1张图片

设置config soundName 

import PushNotification from 'react-native-push-notification';

 config.soundName = 'produce.mp3'

 PushNotification.localNotification({
    ...config,
    message: `您有 ${produceNum} 个派工单待处理`,
    ticker: '您有新的派工单了,快去查看吧!'
  });

你可能感兴趣的:(react-native)