-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
华为mate30Pro,鸿蒙系统
v3.10.6
已经设置targetSdk = 29和android:requestLegacyExternalStorage="true"
public class ImageCompressEngine implements CompressFileEngine {
@Override
public void onStartCompress(Context context, ArrayList<Uri> source, OnKeyValueResultCallbackListener call) {
Luban.with(context).load(source).ignoreBy(500)
.filter(path -> PictureMimeType.isUrlHasImage(path) && !PictureMimeType.isHasHttp(path))
.setCompressListener(new OnNewCompressListener() {
@Override
public void onStart() {
}
@Override
public void onSuccess(String source, File compressFile) {
LogUtils.i("localMediaCompress",source);
if (call != null) {
call.onCallback(source, compressFile.getAbsolutePath());
}
}
@Override
public void onError(String source, Throwable e) {
LogUtils.i("localMediaCompress", source);
LogUtils.i("localMediaCompress", e.getMessage());
if (call != null) {
call.onCallback(source, null);
}
}
}).launch();
}
}
稍微大点的图片,2-3M的,手机拍照的,就会loading很长时间,一张差不多2分钟左右吧,且大几率会crash
Metadata
Metadata
Assignees
Labels
No labels