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

Specific time in week repeatType

Open ilyasbat opened this issue 3 years ago • 10 comments

Is that possible?

 PushNotification.localNotificationSchedule({
      date: date,

      channelId: ANDROID_CHANNEL_NAME,
      id: id, // (optional) Valid unique 32 bit integer specified as string. default: Autogenerated Unique ID
      vibrate: true,
      vibration: 300,
      title: title, // (optional)
      message: message, // (required)
      userInfo: {screen: 'blabla'},
      soundName: 'bell.mp3', 
      repeatType: 'week',
      allowWhileIdle: true,
    });

I use these codes but the time is not set. 00:00 appears as the notification time. Can't I set weekly notifications at different times on the same day?

ilyasbat avatar Sep 13 '21 21:09 ilyasbat

Hi,

The time of the notification is the one defined in date. It cannot be different on each repetition.

Regards

Dallas62 avatar Sep 14 '21 04:09 Dallas62

Thanks. I decide to schedule again after every notification.

ilyasbat avatar Sep 14 '21 05:09 ilyasbat

Take care of the number of notification you define, in iOS it's 64, and on Samsung too if I remember correctly. If this exceed, notifications will not trigger (even if set sooner than other) or it will never trigger a notification (depend on manufacturers).

Dallas62 avatar Sep 14 '21 07:09 Dallas62

Take care of the number of notification you define, in iOS it's 64, and on Samsung too if I remember correctly. If this exceed, notifications will not trigger (even if set sooner than other) or it will never trigger a notification (depend on manufacturers).

Dallas62 avatar Sep 14 '21 07:09 Dallas62

A scheduled notification is canceled automatically. If an old notification was not canceled. I cancel so i think no problem in this situation. Totally 40 notifications set.

ilyasbat avatar Sep 14 '21 08:09 ilyasbat

Thanks. I decide to schedule again after every notification.

Hi @ilyasbat how do you schedule again after every notification? Because I need to do it too but cannot find a way since onNotification() in index.js only called if a notification is clicked.

cynde avatar Sep 22 '21 17:09 cynde

Hi, @cynde did you manage to figure this out? I also need to do something on a notification received without clicking it.

zeeshan112233 avatar Apr 10 '22 11:04 zeeshan112233

@zeeshan112233 hi. still don't find it. I managed to use other way without using react-native-push-notification's feature.

cynde avatar Apr 12 '22 07:04 cynde

@zeeshan112233 hi. still don't find it. I managed to use other way without using react-native-push-notification's feature.

Hi @cynde. Could you please share the way you handle this issue? Really appreciate that. Thanks

anhquan291 avatar Jun 04 '22 09:06 anhquan291