Hello!
I'm developing an AR application, that need the camera preview, but I draw
the content of the camera in a texture. In this way, I set invisible the
view that contains the camera preview, and it works well in Galaxy SII
(2.3.4), and Nexus S(4.0.4), but in Galaxy Nexus (4.0.4), it does not work,
because after starting the preview I set invisible the view.
Here is the code of my function to start the preview camera, that belongs
to a SurfaceView:
public void startPreviewCamera(){
if (camera != null)
{
try {
camera.addCallbackBuffer(buffer);//
camera.setPreviewCallbackWithBuffer(this);
camera.setPreviewDisplay(mHolder);
}
catch(Exception e){
Log.d("viewer", "[startPreviewCamera. Exception: " +
e.getMessage());
}
post(new Runnable(){
public void run(){
setVisibility(VISIBLE);
camera.startPreview();
setVisibility(INVISIBLE);
}
});
bPreviewRunning = true;
}
else
{
Log.d("vrviewer", "startPreviewCamera. camera == null");
}
}
Anyone knows the reason of the different behaviour?
Thanks in advance
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en