react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

Vibration pattern not working

Open vandana87 opened this issue 4 years ago • 2 comments

I am using this library along with firebase messaging, and when a notification is received, PushNotification.localNotification is fired, and the notification is displayed successfully, but I want the notification to vibrate in particular pattern , but it is not working I have also tried it with vibrate: true.

below is my code

PushNotification.localNotification({
     channelId:  message.data.android_channel_id,
     ticker: 'My Notification Ticker',
     autoCancel: true, 
     smallIcon: 'ic_notification',
     bigText:'Description',
     color: '#00add4', 
     vibrate: true, 
     vibration:[180, 121, 134, 300, 289, 123, 134, 300, 621, 121, 134, 300, 289, 123, 134, 300], 
     tag: 'some_tag',
     group: 'group', 
     groupSummary: false, 
     ongoing: false, 
     actions: [YES,NO]
     invokeApp: true, 
     when: null, 
     usesChronometer: false,
     timeoutAfter: null, 
     /* iOS only properties */
     category: '', 
     
     /* iOS and Android properties */
     id:msgData.MsgInID,
     message: message.data.message, 
     userInfo: { screen: 'Alarm' }, 
     playSound: true, 
     soundName:message.data.soundName,
     number: 10, 
   });

vandana87 avatar May 20 '21 04:05 vandana87

Hi @vandana87 Yes vibration pattern are not implemented. PR are welcome! Regards

Dallas62 avatar May 20 '21 05:05 Dallas62

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 21 '22 00:05 github-actions[bot]