hiennguyen92 / flutter_callkit_incoming

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

Unable to Answer Calls with Locked Device #519

Open viniciusoliverrs opened 7 months ago

viniciusoliverrs commented 7 months ago

Description:

I am experiencing an issue where I am unable to answer incoming calls when my device is locked. When a call comes in, I am unable to complete the call while the device is locked. The call can only be initiated once the device is unlocked, as this is when Flutter is initialized.

Steps to Reproduce:

  1. Lock the device.
  2. Receive an incoming call.
  3. Attempt to answer the call while the device is still locked.
  4. Observe that the call cannot be completed.
  5. Unlock the device.
  6. Initiate the call successfully after the device is unlocked.

Expected Behavior:

I expect the call answering functionality to behave similarly to applications like WhatsApp, where incoming calls can be answered even when the device is locked. Users should be able to answer calls directly from the lock screen without needing to unlock the device first. This would enhance user experience and provide greater convenience when receiving calls.

Can anybody help me?

umairmehar commented 7 months ago

Hello @viniciusoliverrs, I'm not exactly sure about your use case, but I recently had this same issue on IOS.

My issue was when answering the call on an unlocked phone, it took me to the app screen as expected. But when the phone is locked and I answer the call, the app wakes, and the call starts in the background.

After troubleshooting and trying different applications' behavior, I found that the issue was with the call type.

If you set the call type as video, and answer the call in any state the call will start in the app in the foreground, you'll still need to unlock the device to see the app UI.

viniciusoliverrs commented 7 months ago

Hi @umairmehar, but on Android too? Where can I configure call settings? In the server?