-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to show incoming screen when receiver is in any part of the app? #51
Comments
What do you mean? Please describe in detail which functionality you need. |
I have an app with 5 screens. When caller calls another person from one screen(chat screen) the receiver is receiving the incoming call if the receiver is also in the chat screen. But I want the receiver to get the incoming call when the receiver is in one of the 5 screens. |
What about a variant with the special manager that will listen to calls? You will init it after connecting to the chat and it will open an incoming screen after receiving a new call. Make sense? Or you mean another way? |
Yes,i want to listen for incoming calls in every screen but how to implement it? also, can u elaborate with a sample code snippet? |
do you mean manager? |
Initialize P2PSession and P2PClient in a common environment. Create session and then create instant of these.. After that you can get call anywhere in your application. |
How to initialize p2psession and p2pclient in a common environment? Can u give an example? |
Step1: Create a Environment file and added P2PClient and P2PSession: class Environment { Step2: Create session on your login screen after successful login or Create on first screen of your app if there is not any login screen. Step3: Goto the screen which is first screen after login or your app.. Use Environment variable here and assign session instance. void initState() { void _initCalls() { Environment.callClient.init(); Environment.callClient.onSessionClosed = (callSession) { void _initCustomMediaConfigs() { |
No activity for a long time. Closing... |
No description provided.
The text was updated successfully, but these errors were encountered: