I am using camera code for Android after taking the picture the byte[] imageData parameter is null, I don\'t know why.
package com.pictures;
import java.io.Buff
Ok, I see the problem. You are reusing picture callback for both raw and jpeg callbacks. ANd from javadoc you can read:
Triggers an asynchronous image capture. The camera service will initiate a series of callbacks to the application as the image capture progresses. The shutter callback occurs after the image is captured. This can be used to trigger a sound to let the user know that image has been captured. The raw callback occurs when the raw image data is available (NOTE: the data will be null if there is no raw image callback buffer available or the raw image callback buffer is not large enough to hold the raw image). The postview callback occurs when a scaled, fully processed postview image is available (NOTE: not all hardware supports this). The jpeg callback occurs when the compressed image is available. If the application does not need a particular callback, a null can be passed instead of a callback method.
So if it was called as raw callback, data could be null. If you do not like raw data, just use:
mCamera.takePicture(null, null, mPictureCallback);