Open xPryds opened 5 years ago
I also had this problem with android 7.0. I don't have duplicate selection problems when I use debug breakpoints, so I think it has something to do with that broadcast. Can you talk about your solution?
I have the same question with SAMSUNG s7 & SAMSUNG s 8. I solved it this way. In ImagePickActivity :
private boolean findAndAddTakenImage(List<ImageFile> list) {
for (ImageFile imageFile : list) {
if (imageFile.getPath().equals(mAdapter.mImagePath)) {
boolean contains = mSelectedList.contains(imageFile);
if (contains) {
return true;
}
mSelectedList.add(imageFile);
mCurrentNumber++;
mAdapter.setCurrentNumber(mCurrentNumber);
tv_count.setText(mCurrentNumber + "/" + mMaxNumber);
return true; // taken image was found and added
}
}
return false; // taken image wasn't found
}
When choose use camera and take photo, it is showing 2 selected images. After, If I open an image preview and then close it, It will add +1. It will keep adding +1 even if I don't check the image preview.
Clicking in DONE btn send me back to previous activity with N times the camera image.