invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.82k stars 215 forks source link

Notifications not vibrating with pattern. Just vibrated only once #469

Closed alexander01202 closed 1 year ago

alexander01202 commented 2 years ago

Hello. I am using notifee and I came across this issue.

I am using android.

I set a vibration pattern but it only vibrates the phone once. I am sure it was set after calling the getNotification method. I see the vibration pattern set.

This is my code:

const channelId = await notifee.createChannel({
        id: `default`,
        name: `default`,
        importance: AndroidImportance.HIGH,
        sound: 'default',
        vibration: true,
        vibrationPattern: [300, 500,300,500,300,500,300,500,300,500,300,500],
      });
mikehardy commented 2 years ago

This is for audio not vibration but I wonder if it is similar? #454

alexander01202 commented 2 years ago

So please how do allow the notification make the phone vibrate mutilple times? I was able to do this on expo notification, I am surprised that I can't see anywhere to do such in notifee. If expo notifications has it, definetly it shouldn't be such a complex feature?

alexander01202 commented 2 years ago

But I just read your docs again now. It says for vibration not audio.

The pattern must be an even amount of numbers and follows a "vibrate and delay" schema. Each number is the amount of milliseconds. For example, "300ms vibrate" then "500ms delay" would be [300, 500]. The pattern can be passed to the vibrationPattern property.

mikehardy commented 2 years ago

If expo notifications has it, definetly it shouldn't be such a complex feature?

That's fantastic to hear! If they have it and it is not complicated, then with their package being open source and ours being open source, the PR shouldn't be so bad - if you tag me in it when you post it I can help review

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Guilherme5342 commented 1 year ago

Hi, i'm encountering the same issue, @alexander01202 did you found a solution or workaround?

For now i'm using react native's Vibration but i can't call it with the app on the background so....

mikehardy commented 1 year ago

There is no solution or workaround, the comments indicate someone needs to post a PR here to implement it. We are welcome to a PR that does implement it

Maverick23 commented 1 year ago

Any update on this ? Not having the vibrations work is a serious limitation.

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

vikaskumar122232 commented 7 months ago

I'm facing the same issue any one can help me out ?