android-hidden-camera icon indicating copy to clipboard operation
android-hidden-camera copied to clipboard

App get lag when start camera from service

Open IshanFx opened this issue 7 years ago • 9 comments

When open camera from the service app get freeze some second. Is there any way to run this smoothly? I user Handler and no luck.

IshanFx avatar Feb 23 '18 17:02 IshanFx

Your device on android 8?

viks178 avatar Feb 24 '18 06:02 viks178

No, its 5. I thinks it because startcamera run on main thread.

IshanFx avatar Feb 25 '18 16:02 IshanFx

I am experiencing the same issue. My app locks up after taking a picture from the service.

gaynor avatar Mar 08 '18 21:03 gaynor

Same as me. I tried to use other thread instead of main looper but service cannot get image data from that thread.

minionsong avatar Mar 19 '18 01:03 minionsong

I have the same problem. When takes the picture freeze the application. Android version: 8 CameraConfig: REAR_FACING_CAMERA

gabrikid96 avatar Apr 29 '18 17:04 gabrikid96

Same problem here in Android 8 , Any Idea ???

shobhan1595 avatar Jul 23 '18 12:07 shobhan1595

Same here. Android 8.

sknepal avatar Oct 15 '18 23:10 sknepal

I think the camera.open is launching on main thread and thats why its blocking UI and leading to lags..try https://github.com/KAditi/Camera-Application. It gives no problem; it uses asynctask.

androidnoob123 avatar Oct 18 '18 21:10 androidnoob123

I have the same problem. When takes the picture freeze the application. Android version: 8 CameraConfig: REAR_FACING_CAMERA

I think some changes in HiddenCameraService.java can solve this issue.

Change this line (in HiddenCameraService.java, line 130) WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH to a line WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE

@gaynor @sknepal @shobhan1595 ☝🏻try this too

@kevalpatel2106 What you think about this? Can we make a change?

viks178 avatar Nov 10 '18 15:11 viks178