hiennguyen92 / flutter_callkit_incoming

Flutter Callkit Incoming
https://pub.dev/packages/flutter_callkit_incoming
MIT License
180 stars 312 forks source link

The app opens in a new thread. #586

Closed sanjidbillah closed 2 months ago

sanjidbillah commented 2 months ago

When the app is already open, it opens a new thread, resulting in two threads running simultaneously. Additionally, when I receive a notification, it triggers multiple calls.

https://github.com/hiennguyen92/flutter_callkit_incoming/blob/fd7dd0d7fc748925b1d30f6152f98b70a7e81c1a/android/src/main/kotlin/com/hiennv/flutter_callkit_incoming/CallkitIncomingActivity.kt#L295-L300

TheauLep commented 1 month ago

Hello, is there any way to avoid multiple threads ?

sanjidbillah commented 1 month ago

Use this in your manifest : android:launchMode="singleInstance"