igreenwood/SimpleCropView

Bugs in api level higher than 23

igreenwood opened this issue · 3 comments

  • context.getContentResolver().openInputStream throws FileNotFoundException.(That worked in 23.)
  • Needs investigation for changes related to Uris in new apis(24~26).

It seems like an emulator bug.

It seems like an emulator bug.

@IsseiAoki

That would be great if you push a fix for that

According to link you'd better not to use url to path.
I was able to load image using this code (instead of cropView.load(uri).execute(null) )

InputStream input;
Bitmap bmp;
try {
    input = getApplicationContext().getContentResolver().openInputStream(img);
    bmp = BitmapFactory.decodeStream(input);
    cropImageView.setImageBitmap(bmp);
} catch (FileNotFoundException e1) {
    e1.printStackTrace();
}

So I suggest to replace load method getting parameter context and fix the issue