gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

v. 3.0.5 - Android - handleMethodCall of android_alarm.dart not being called after channel?.invokeMethod("alarmRinging", mapOf("id" to id)) #138

Closed gabriel-primesw closed 10 months ago

gabriel-primesw commented 10 months ago

Alarm plugin version 3.0.5

For some reason, when the alarm is started and the app is not killed, the handleMethodCall of the AndroidAlarm class is not being called after the onStartCommand is completely executed, and the Alarm.ringStream.stream is also not executed because there's no Alarm.ringStream.add(settings) being called.

There's no exception being thrown, all seems ok.

Did all the recommended setup to Android, all the permissions, everything.

Tested the 2.0.1 on my app and the ringStream works perfectly (probably because of the way the onRingFunction is organized)

Also tested the 3.0.5 version in the test app and the handleMethodCall works fine. It seems like it's a conflict with other dependencies, probably the firebase ones.

gdelataillade commented 10 months ago

Hi @gabriel-primesw

Thanks for interest in the plugin.

I don't think there could be a conflict with another dependency because I gave a unique name for my method channels: com.gdelataillade.alarm/alarm. However, they may use background processes in a way that affects my plugin's background operations. I'll investigate when I'll find the time. In the meantime, if you can, you could remove one by one the dependencies you suspect and this way determine which one causes conflicts.

gabriel-primesw commented 10 months ago

allright, thank you