I'm trying to use the camera to take pictures in my app, and then crop the taken images.
Everything is working for the recent versions for Android, but not for Android Kitkat 4.4.2.
the Camera returns a null URI.
get the URI onActivityReslult :
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == CAMERA_CODE && resultCode == RESULT_OK) {
Bundle extras = data.getExtras();
Bitmap imageBitmap = (Bitmap) extras.get("data");
picUri = data.getData();
Intent i = new Intent(PublierActivity.this, CropActivity.class);
i.putExtra("Uri", picUri);
startActivityForResult(i, CROP_CODE);
}
Here is how I call the camera intent :
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takePictureIntent, CAMERA_CODE);
}
is there any way to make an exception for oldest versions for android to resolve this problem ?