flutter-webrtc / dart-sip-ua

A dart-lang version of the SIP UA stack.
MIT License
339 stars 269 forks source link

Microphone gets muted when user locks screen while in call. #468

Open DooMMasteR opened 3 months ago

DooMMasteR commented 3 months ago

Whenever the user locks the phone screen (Android) while in a call, the devices microphone will be muted after a few moments.

Steps to reproduce the behavior:

  1. Make call
  2. lock screen while in call
  3. wait for up to 10 seconds
  4. the mic becomes muted until you unlock the phone again

I would have expected the call to stay functional.

Flutter SDK Version: 3.22.3 Target OS and Version: SDK 21 Host OS and Version: Android 14

kritika6785 commented 3 months ago

Give microphone permission as a background service, it will work.

DooMMasteR commented 3 months ago

Just any service? Our call/callui is currently not a service, this worked fine so far, but now it started failing on multiple devices.

kritika6785 commented 3 months ago

<service android:name="id.flutter.flutter_background_service.BackgroundService" android:foregroundServiceType="microphone"> <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_MICROPHONE" android:value="callerApp=ProcessRecord"/> </service> I had used flutter_background_service

RaviGaruda commented 2 months ago

@kritika6785 Awesome its working good

RaviGaruda commented 2 months ago

@kritika6785 have you made foreground service for keep running active call if user close/terminate application during live voice call?

kritika6785 commented 2 months ago

Not yet unable to keep the call active. Because sip get disconnected when we terminate the application.

On Thu, 12 Sept, 2024, 4:38 pm RaviGaruda, @.***> wrote:

@kritika6785 https://github.com/kritika6785 have you made foreground service for keep running active call if user quite application during live voice call?

— Reply to this email directly, view it on GitHub https://github.com/flutter-webrtc/dart-sip-ua/issues/468#issuecomment-2345996853, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAWMMJJW2AI26JWNT3OUQ2DZWFY33AVCNFSM6AAAAABMQJXAOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVHE4TMOBVGM . You are receiving this because you were mentioned.Message ID: @.***>

Adnan-addi commented 1 month ago

any way to keep sip active while app goes to background during an active voice call ?

reduxdj commented 1 month ago

If you don't terminate the call when ice disconnects you can do this? we do.