I'm not trying to configurate the custom camera, I only need to take a picture with it.
I have a SurfaceView in my xml and a button to take photos. I find this method to take a picture:
mCamera.takePicture(null, null, mPicture);
mPicture defined like this:
Camera.PictureCallback mPicture = new Camera.PictureCallback() {
@Override
public void onPictureTaken(byte[] data, Camera camera) {
pictureFile = getOutputMediaFile();
if (pictureFile == null) {
return;
}
try {
FileOutputStream fos = new FileOutputStream(pictureFile);
fos.write(data);
fos.close();
} catch (FileNotFoundException e) {
} catch (IOException e) {
}
}
};
What I need for is a bitmap of the taken image in order to use it in another Activity. Thanks in advance!