in app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java [308:334]
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == Activity.RESULT_OK) {
if (data == null) {
return;
}
Bundle extras = data.getExtras();
Bitmap imageBitmap = (Bitmap) extras.get("data");
file = FileUtils.createFile(getString(R.string.fineract), customerIdentifier + ".png");
FileUtils.saveBitmap(imageBitmap, file);
tvImageName.setText(file.getName());
ivCustomerPicture.setImageBitmap(imageBitmap);
showImageSizeExceededOrNot();
} else if (requestCode == REQUEST_PHOTO_FROM_GALLERY && resultCode == Activity.RESULT_OK) {
if (data == null) {
return;
}
Uri uri = data.getData();
file = new File(FileUtils.getPathReal(getActivity(), uri));
tvImageName.setText(file.getName());
Glide.with(getActivity()).load(uri).asBitmap().into(ivCustomerPicture);
showImageSizeExceededOrNot();
}
}