Closed WeiLianYang closed 4 years ago
严总,最近是不是很忙,最近要适配Android 10了,发现MediaReader的scanImageFile方法里面可能要改下子了,查找图片的地址: long id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID)); Uri path = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id);
在Android Q上无法兼容的就看这个库吧:https://github.com/Yalantis/uCrop
严总,最近是不是很忙,最近要适配Android 10了,发现MediaReader的scanImageFile方法里面可能要改下子了,查找图片的地址: long id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID)); Uri path = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id);