Skip to content
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

Broken camera after sleep mode on Android #161

Closed
theSharpestTool opened this issue Jul 16, 2020 · 4 comments
Closed

Broken camera after sleep mode on Android #161

theSharpestTool opened this issue Jul 16, 2020 · 4 comments

Comments

@theSharpestTool
Copy link

Steps to reproduce:

  1. Turn off the screen of android device/wait until it goes to sleep mode
  2. After a minute a message in the logs:

E/AGORA_SDK(24213): cannot open log file for writing: agorartm.log, err=30
E/AGORA_SDK(24213): cannot open log file for writing: agorartm.log, err=30
W/Binder:24213_1(24213): type=1400 audit(0.0:235716): avc: denied { read } for name="u:object_r:camera_prop:s0" dev="tmpfs" ino=15660 scontext=u:r:untrusted_app_27:s0:c236,c257,c512,c768 tcontext=u:object_r:camera_prop:s0 tclass=file permissive=0
E/libc (24213): Access denied finding property "camera.aux.packagelist"
W/Binder:24213_3(24213): type=1400 audit(0.0:235717): avc: denied { read } for name="u:object_r:camera_prop:s0" dev="tmpfs" ino=15660 scontext=u:r:untrusted_app_27:s0:c236,c257,c512,c768 tcontext=u:object_r:camera_prop:s0 tclass=file permissive=0
E/libc (24213): Access denied finding property "camera.aux.packagelist"
W/om.openmed.liv(24213): Long monitor contention with owner main (24213) at boolean android.os.BinderProxy.transactNative(int, android.os.Parcel, android.os.Parcel, int)(BinderProxy.java:-2) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onCaptureStarted(android.hardware.camera2.impl.CaptureResultExtras, long) for 339ms

  1. After the screen is turned on the camera is frozen.
  2. AgoraRtcEngine.muteLocalVideoStream(false); makes the camera image black

The issue can only be solved by reloading the app. On IOS works fine.

@plutoless
Copy link

on android you will need to call disableVideo when going to background mode, while you will need to call enableVideo when coming back to foreground mode. If you want to keep camera working you will need to use foreground service, otherwise you will need to follow above guidance

@theSharpestTool
Copy link
Author

@plutoless Thank you, the solution with disableVideo works

@LichKing-2234
Copy link
Contributor

you can refer to this comment.
#28 (comment)

@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants