• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

In onPreviewFrame method, can't get any data!

Hello,

I'm a newbie in Android. I have a problem with my sample which I got from here. I don't understand, why does the "data" array argument in my onPreviewFrame method always has the length of 8.

I also test with other application which call this method, if I remove the creation of YuvImage line, everything is ok, but it also means that I can't get a black-white image from my camera. It's so strange, because that code is same with most of samples I got on Internet. I think it's caused by device, but I'm not sure about that.

My camera is ok with other application, but whenever an application relates to "preview callback" (onPreviewFrame), that situation would happen. I really don't understand with my case. So does anyone experience on this? Any help will be greately appreciated.

Thanks,
Tuan
 
Back
Top Bottom