3

I'm working with different version of Android in an application using JNI. I followed This tutorial

First of all, I manage the camera from Java, and send the data using JNI and store it into a OpenCV matrix and then manipulate the data. My application works fine in versions before 4.1.2, but in newest devices, it doesn't work.

The problem is, I set invisible the camera's preview in the UI. If the layer is not drawing, in newest versions the callback stop.

I only found a solution, but I cannot make it work. Someone know how to solve the problem of the callback preview WITHOUT show the image in the screen?

Exist another alternative, like open directly the camera in Native and use the callbacks in another thread?

LOG_TAG
  • 19,894
  • 12
  • 72
  • 105
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
  • 1
    The question [has been](http://stackoverflow.com/questions/10775942/android-sdk-get-raw-preview-camera-image-without-displaying-it) [addressed](http://stackoverflow.com/questions/9744790/android-possible-to-camera-capture-without-a-preview) [more](http://stackoverflow.com/questions/11876093/android-accessing-hardware-camera-preview-frame-data-without-drawing-them) [than](http://stackoverflow.com/questions/9653563/hide-camera-preview-but-still-receive-preview-callbacks) [once](http://stackoverflow.com/questions/2386025/android-camera-without-preview) on SO. I don't think a new one can help. – Alex Cohn Jan 19 '14 at 09:01

1 Answers1

3

This is very interesting, please try to reverse engineering this code HiddenCamera

try to grab the logic with this refs :

turn-your-android-phone-into-remote-spy

android-camera-capture-without

android-take-a-picture-without-displaying-a-preview

LOG_TAG
  • 19,894
  • 12
  • 72
  • 105
  • 1
    I´m looking for an official solution, if next android update invalidate this implementation doesnt work for me. – vgonisanz Jan 26 '14 at 08:41