Now on activity result you have to use like this.
if (requestCode == CAMERA) {
final File file = getTempFile();
new Thread(new Runnable() {
@Override
public void run() {
try {
selPath = file.getAbsolutePath();
final String selectedImagePath = file
.getAbsolutePath();
bitmap = BitmapFactory
.decodeFile(selectedImagePath);
selPath = selectedImagePath;
} catch (Exception e) {
Log.v(TAG, "Exception: " + e.toString());
handler.sendEmptyMessage(IMAGENOTLOADED);
}
}
}).start();
}
getTempFile method is like this
private File getTempFile() {
final File path = new File(Environment.getExternalStorageDirectory(),
getPackageName());
if (!path.exists()) {
path.mkdir();
}
return new File(path, fileName);
}