flutter-webrtc / callkeep

iOS CallKit and Android ConnectionService for Flutter
MIT License
133 stars 147 forks source link

Lockscreen issue #69

Open Dhrumil-Dhameliya opened 3 years ago

Dhrumil-Dhameliya commented 3 years ago

Hi, i used this dependency in my flutter project to make and receive calls on android devices.App is receiving call in Foreground, Background and Killed state and i am able to redirect user to specific page where my business logic occurs but my app is facing issue when phone is in locked state. App is receiving calls on locked state but when i actually answer the call app is not asking user to unlock phone. Currently when i answer call in locked state app is redirecting users to the page i want to but user needed to unlock phone after answering call to actually see this happening(Redirection is happening in background even before i unlocked my phone after answering call)

Steps to reproduce : Kill the app Receive call when phone is locked App is not asking user to unlock phone When user unlocks the phone after answering call app is already redirected user to the page i want to.

Now my question is is it possible to prompt user to unlock phone after he/she answered the call after receiving it so that i can open page inside app? if yes then how can i do this?

safdaralimalik commented 3 years ago

@NSBlackMirror can you please tell me how you able to navigate to a specific page when a call receives in the background or foreground. Actually, I am not able to navigate to a specific screen, In my case real call starts and not able to navigate.

santhosh-89 commented 3 years ago

I can't receive the call-in lock screen after the app terminates on the iPhone device. it's working fine in the background and foreground.

JayPerfetto commented 3 years ago

@NSBlackMirror can you please tell me how you able to navigate to a specific page when a call receives in the background or foreground. Actually, I am not able to navigate to a specific screen, In my case real call starts and not able to navigate.

I had to fork this repo and extend the ios methods to pass the data payload in the arguments of didDisplayIncomingCall - it wasn't much, the code is seemingly there, just for whatever reason its not implemented

JayPerfetto commented 3 years ago

I face the original posters issue, and it is critical that it be resolved. Can the package creator please be a bit more responsive to these important requests? It has been nearly 2 months that this has gone unanswered or even acknowledged....

janhelwich commented 3 years ago

@JayPerfetto were you able to solve the problem by any chance? Thanks in advance.

janhelwich commented 3 years ago

After some more reading here and there I got it working for Android at least. Had to add to the MainActivity in AndroidManifest the following. Now I am able to end the call and just show my app even in locked state.

android:showWhenLocked="true"
android:turnScreenOn="true"

So the whole part looks like this:

<activity
            android:name=".MainActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:windowSoftInputMode="adjustResize"
            android:showWhenLocked="true"
            android:turnScreenOn="true">
maheshsuthar93 commented 2 years ago

Hi any one know how to open specific page when app is in kill mode when user click on accept call?