cordova-plugin-local-notifications icon indicating copy to clipboard operation
cordova-plugin-local-notifications copied to clipboard

Vibrating for a whole minute and crashing

Open AbayIbrayev opened this issue 5 years ago • 4 comments

The phone vibrates for a whole minute and either crashes or continues to work after the minute when trying to trigger the everyday notification.

Your Environment

  • Plugin version: 0.9.0-beta.2
  • Platform: Android
  • OS version: MIUI 11.0.4
  • Device manufacturer / model: Xiomi Redmi Note 8
  • Cordova version (cordova -v): 9.0.0
  • Cordova platform version (cordova platform ls): 8.1.0
  • Plugin config "cordova-plugin-local-notification": {}
  • Ionic Version (if using Ionic) 5.4.15

Expected Behavior

receive notification 1 time when using trigger {every: {hour: 12, minute: 0}}

Actual Behavior

the phone vibrates for a whole minute and either crashes or continues to work after the minute passed eventually

Steps to Reproduce

using trigger {every: {hour: 12, minute: 0}} or any other minute (when I used every: ELocalNotificationTriggerUnit.MINUTE everything was alright, however, I really need that 12:00 notification)

this.localNotifications.schedule({
        id: 1,
        title: "Hey, check this out!",
        text: `Don't forget to check out our daily deals & offers on our ${this.randomChosenCategory} products!`,
        trigger: { every: { hour: 10, minute: 30 } }
      });

Context

Want to receive a scheduled notification every day at 12:00

Debug logs

build is successful so there are not any error logs, however, it vibrates for a whole minute for some reason even though the notification appears in a normal way.

AbayIbrayev avatar Feb 17 '20 14:02 AbayIbrayev

We are having the same issue. The app receives endless notifications for a whole minute. In some devices it crashes after a few seconds with a StackOverflowError.

NilLlisterri avatar Mar 06 '20 09:03 NilLlisterri

@NilLlisterri unfortunately, they never responded to me, I actually already finished the app I was working on while they were responding. What I can suggest, as it is definitely their bug, you can just set it to send the notification daily and this issue will disappear, however it is sad that you cannot control the time when you receive it. If you find the solution send it to me pls.

AbayIbrayev avatar Mar 08 '20 07:03 AbayIbrayev

Facing same issue

alphagamer7 avatar Mar 04 '21 07:03 alphagamer7

Hi all, perhaps you can try this fork, it is more recent and still maintained (to my knowledge): https://github.com/timkellypa/cordova-plugin-local-notifications

Note: -The fork also includes updates for Android 10. -It uses androidx, so you might need cordova-plugin-androidx and/or cordova-plugin-androidx-adapter plugins.

Hope it helps. Thanks.

On Thu, Mar 4, 2021 at 2:20 PM Athif Shaffy [email protected] wrote:

Facing same issue

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rahmadid avatar Mar 04 '21 10:03 rahmadid