0

I use surfaceview way of showing camera for my qrcode scanner application in android. i get the preview frames continously using onPreviewFrame callback and i start detecting qrcode from that. Now i want to enable autofocus feature in this app.My phone has autofocus feature. I followed the procedure said in android document.but still autofocus is not enabled in my app.I donot know is there any other way to enable autofocus on this application which uses surfaceview and onPreviewFrame? Pls correct me if i am doing in wrong way? And tell me how to do this correctly?

gReEn HoRn
  • 274
  • 1
  • 4
  • 19

1 Answers1

1

Try and use

<uses-feature android:name="android.hardware.camera.autofocus" /> 

in your manifest

KP_
  • 1,854
  • 25
  • 43