Skip to content Skip to sidebar Skip to footer

Mcamera.setpreview{@override Onpreviewframe() } Not Work

I want to record videos and analysis the current bitmap in service. So I register surfaceHolder.addCallback in onStartCommand function. And set mCamera.setPreviewCallback in surfa

Solution 1:

It seems you're stopping camera preview inside surfacechanged

mCamera.stopPreview();

Try restarting preview inside onSurfaceChanged

Quoting the docs

The preview must also be restarted in the preview class surfaceChanged() callback method.

Post a Comment for "Mcamera.setpreview{@override Onpreviewframe() } Not Work"