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

App get lag when start camera from service #27

Open
IshanFx opened this issue Feb 23, 2018 · 9 comments
Open

App get lag when start camera from service #27

IshanFx opened this issue Feb 23, 2018 · 9 comments

Comments

@IshanFx
Copy link

IshanFx commented Feb 23, 2018

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.

@viks178
Copy link
Contributor

viks178 commented Feb 24, 2018

Your device on android 8?

@IshanFx
Copy link
Author

IshanFx commented Feb 25, 2018

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

@gaynor
Copy link

gaynor commented Mar 8, 2018

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

@minionsong
Copy link

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

@gabrikid96
Copy link

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

@shobhan1595
Copy link

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

@sknepal
Copy link

sknepal commented Oct 15, 2018

Same here. Android 8.

@androidnoob123
Copy link

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.

@viks178
Copy link
Contributor

viks178 commented Nov 10, 2018

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 added a commit to viks178/android-hidden-camera that referenced this issue Nov 11, 2018
SaulNunez pushed a commit to Sheldrybox/android-hidden-camera that referenced this issue May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants