UnifiedPush / flutter-connector

Mirror of https://codeberg.org/UnifiedPush/flutter-connector
Apache License 2.0
31 stars 11 forks source link

Cannot register after getting a notification until app is killed and started again #3

Closed karmanyaahm closed 3 years ago

karmanyaahm commented 3 years ago

https://github.com/karmanyaahm/flutter_unified_push/blob/3127c1ee3fefe91bbd8076e342ddcffe3ea229b3/android/src/main/kotlin/cc/malhotra/karmanyaah/flutter_unified_push/MyService.kt#L69-L70

Everything seems to be fine before that and broken after that. I think creating a new engine redirects all the channels to the new engine on the kotlin side and expects the new engine to have listeners for those channels.

The solution is probably to make sure the engine/binarymessenger is shared if the app is already running. (original: https://github.com/karmanyaahm/flutter_unified_push/issues/5)

p1gp1g commented 3 years ago

Fixed