I am trying to take a pic from cam in my app, but it is working fine in but not able to display it in imageview it's throwing error..
please help me
my code is
It is giving error at the time of Decoding bitmapUri (i mentioned in code)
the error is:
private void onCaptureImageResult(Intent data) {
Log.w("CAM","capture image result");
launchMediaScanIntent();
try {
File photo = new File(Environment.getExternalStorageDirectory(), "picture.jpg");
Log.w("CAM","decoding bitmap uri");
Context context=FSE_login.this;
Bitmap bitmap = decodeBitmapUri(this, FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".lerainfotech.tezmoney.FSE_login", photo));
Log.w("CAM","decoded");
attendance_pic = Utils.getResizedBitmap(bitmap);
Log.w("CAM","attached");
attendance_pic_field.setImageBitmap(attendance_pic);
} catch (Exception e) {
Log.w("Error Is",e);
Utils.showErrorDialog(getApplicationContext(), "Couldn't load image");
return;
}
}