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

Vibrating only once

Open anwersolangi opened this issue 3 years ago • 3 comments

Bug

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 keep vibrate for the nth number of seconds using vibration: 30000, but it is not working i have also tried it with vibrate: true. These are the codes i am using.

    PushNotification.localNotification({
      channelId: 'videoCall',
      autoCancel: false,
      color: 'red',
      vibrate: true,
      vibration: 1200,
      visibility: 'private',
      priority: 'max',
      ignoreInForeground: false,
      when: null,
      actions: ['Answer', 'Decline'],
      messageId: notification.messageId,
      onlyAlertOnce: false,
      id: 0,
      title: 'My Notification Title', // (optional)
      message: 'My Notification Message', // (required)
    });

Environment info

react-native info output:

  "react-native": "0.63.4",
  "@react-native-firebase/messaging": "^11.4.1";
  "react-native-push-notification": "^7.3.1";

Library version: 7.3.1

Steps To Reproduce

  1. create react-native project.
  2. install library.
  3. fire push notification with the above codes. ...

Describe what you expected to happen:

  1. The device should keep vibrate until the time end.

anwersolangi avatar May 16 '21 13:05 anwersolangi

Hi @anwersolangi It would be really weird to see a vibration during 30s, actually there is no pattern for vibration. Regards

Dallas62 avatar May 17 '21 07:05 Dallas62

Hi @anwersolangi It would be really weird to see a vibration during 30s, actually there is no pattern for vibration. Regards

Actually i am trying to implement a video call notification, i have checked stackoverflow to use callkeep but its too messy and requires phone account permission, so i want a pattern like instagram doing, to keep vibrate the phone for nth of seconds

anwersolangi avatar May 17 '21 07:05 anwersolangi

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 18 '22 00:05 github-actions[bot]