Closed codoffer closed 2 months ago
Please use foreground service to keep-alive. it cannot be embedded in UIKit, so you need to embed it yourself in your app.
@yoer Thanks. Which service or method of zegocloud?
i mean, you can refer to plugins like flutter_background or flutter_foreground_task.
I have tried these plugins. These plugins require a specific task to run in the foreground. I am unsure what the task or action will be to keep alive during the background or kill state. Will we have to stay alive with any specific zegocloud function?
@yoer We are using only API for calling (https://www.zegocloud.com/docs/uikit/callkit-flutter/invitation-config/api-for-call-invitation). We have limited access to the calling screen with UI Kit.
Using the above plugins - We can put a specific code/action in the foreground mode. Here, I do not have any action or widget to put in the foreground. Please suggest more about this.
It's a major bug for the voice call feature.
@yoer please give your suggestion on this in detail so we can implemented this
You need to implement app keeping alive by yourself, we do not provide a keeping alive solution in uikit.
this example should be keep alive during background, You can refer to it. The major code is [here]: (https://github.com/ZEGOCLOUD/zego_uikit_prebuilt_live_audio_room_example_flutter/tree/master/live_audio_room/android/app/src/main/kotlin/com/zegocloud/uikit/flutter/live_audio_room)
or you can refer this document.
Hope these can help you.
@yoer Using this, we are getting another issue with the Android devices. The app keeps active with the locked screen and not getting any calls.
do you mean, the app is now kept alive in the background. but when the screen is locked, the call cannot be received?
How long do you lock the screen for? If it exceeds a certain time, an offline call will be triggered, which means you need to make some offline-related configurations to make normal.
You can refer to this document.
Yes, I am aware of offline calls with background and killed state.
Issue The user locks the phone during the app in the foreground stage. The app keeps opening and not able to receive notifications or calls. It may be due to the wake lock, etc.
Can you give me a log and the specific time of occurrence (call time)?
Regarding how to get the logs, you can refer to the How to get android device logs chapter of this document
@yoer Please share your email address. I will share zip files.
iamyoer@gmail.com
@yoer We have tried with the updated document. It's crashing with Android 14.
Environment
Device information: Realme 11 Pro Plus - Android 14 (and other Android devices also)
Description
Expected behavior: A normal voice calls with all modes - foreground, background, and kill mode.
Current behavior:
During voice calls, if the user (callee or caller) closes the app or locks the phone. The app is not able to access the microphone and the audio gets muted. As a result, there is no audio from one side.
Steps to reproduce
Install with UI kit with basic flutter and check with the Android device (app in the background or locked status).
Additional efforts
After reading multiple articles, we tried to use foreground services for Android. We used one package (https://pub.dev/packages/flutter_foreground_task) to keep the call mic status active. But all was in vain.
We are looking for help with the above package or any alternative way to enable the mic during the background/kill state. What will be the service/function/method to be used with the above package to keep the mic accessible?