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

Black Screen #6

Closed
rafaelcorreiapoli opened this issue Jan 11, 2016 · 3 comments
Closed

Black Screen #6

rafaelcorreiapoli opened this issue Jan 11, 2016 · 3 comments

Comments

@rafaelcorreiapoli
Copy link

Hello! when I call startPreview on the onCreate method of an activity or a fragment, the surface becomes black (but my webcam turns on the led indicating it's on)
it only works when i call startPreview on a click of a button or something that will happen on a later time..
How can I fix that?

@PriteshJain
Copy link

May I know what device and android version?

@rafaelcorreiapoli
Copy link
Author

API 22

@ericwan78
Copy link

@rafaelcorreiapoli I had the same problem. The issue is your code calling startPreview before the surface is ready. Try adding callback to your surface and call startPreview in the onSurfaceChanged method.

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

4 participants