Reputation:
I'm developing an app using Camera2 in which I need to capture photos without affecting the preview but I have problems.
In all the phones I can take pictures while showing the preview but in some of them the preview freezes for a moment and this is what I want to avoid.
My app works in some devices but not in all of them. At first I thought it would be due to the hardware support camera (LEGACY, LIMITED, FULL) but I was wrong.
In a Nexus 5 with FULL support it works. In a Huawei P8 Lite with LEGACY support it doesn't work. And in a BQ Aquaris U with LEGACY support it works :S. All three phones have API 23.
Here you have the console log produced while taking a picture: https://jpst.it/11qjM
Does someone know what is the reason? Is it due to the camera drivers of the manufacturer?
Thanks!
Upvotes: 1
Views: 1306
Reputation: 598
As a full time developer that spends most of my time working on camera stuff I can say without doubt that the Camera2API is broken on Samsung devices and I assume issue exists with other manufacturers. Some features will work on some of their phones others not at all and getting even a basic image taking app to work reliably on Samsung devices is way more trouble then its worth. Use the original Camera API. You'll get warnings that its deprecated but that code is staying there. I haven't personally ran my applications on those phones you listed but it doesn't surprise me that it isn't limited to just Samsung devices.
Upvotes: 2