emekalites / react-native-alarm-notification

schedule alarm and local notification in react-native
https://www.npmjs.com/package/react-native-alarm-notification
MIT License
225 stars 95 forks source link

Multiple Alarms #117

Closed Mushi42 closed 3 years ago

Mushi42 commented 3 years ago

Hi @emekalites, first Thanks for this package , i got the best one till yet, I am trying to set multiple alarms but all of the alarms got dismissed on time without any notification. but the last alarm work fine and popping notification. Not understanding the reason. anyone please help?

Mushi42 commented 3 years ago

For Android i got a workaround by changing the logic for alarmId. The issue was with the alarmId in Android/app/sec/main/AlarmUtil.java file you can configure with your own logic to make it unique on every single try.👍 It worked for me Thanks

vishva-shukla commented 3 years ago

Hi @Mushi42, What changes you have made? I'm also facing the same problem

Mushi42 commented 3 years ago

Hi @Mushi42, What changes you have made? I'm also facing the same problem

Hi @vishva-shukla , in alarmUtil.java (also complete file path mentioned above) there we have logic to generate unique id for every individual alarm but somehow the built in logic was not working for me . So i take current time in unix and make it the id for alarm. Which will be unique for every ms. That's how it's working for me.

Thanks