Search code examples
androidandroid-cameraandroid-4.4-kitkat

How to use the ImageReader that appeared in Android 4.4?


Android 4.4 Kit Kat introduced the ImageReader class for accessing the image in the Surface, useful for real-time processing of a camera preview. However, I can't figure out how to link it to the Surface or use it. Anybody have any insights or short example code?


Solution

  • You can find an example in the camera CTS tests.

    As noted in the comments, ImageReader isn't actually usable until 5.0 ("Lollipop").