压缩图片没有走onSuccess的回调,压缩失败没有onCompressFailed()回调
/** * description: * author: liujie * date: 2017/8/22 18:19 */ public void compressToFileJni(final File file, final OnCompressListener mOnCompressListener) { FileUtil.runOnSubThread(new Runnable() { @Override public void run() { BitmapUtil.compressImageJni(context, Uri.fromFile(file), maxWidth, maxHeight, compressFormat, bitmapConfig, quality, destinationDirectoryPath, fileNamePrefix, fileName, optimize, keepResolution, mOnCompressListener); } }); }
这段代码里面BitmapUtil.compressImageJni的参数Uri使用了Uri.fromFile(file)没有考虑Android7.0的情况吧
另外再提一点,多线程压缩没有所有完成的回调。希望博主改进哈。
是个别手机有问题吗?还是所有的都有问题呢?
我所测试的三星,小米,华为,模拟器都有此类问题,均无法成功压缩图片
不可能吧,我测试的手机都成功了,你能不能把demo用邮箱发给我一份?
检查一下传进去的file是否有效
没有回调的啊~ 魅族pro6s
你是集成进去的还是直接下载这个demo跑的?这个demo你试试能跑吗?
谢谢反馈,我有时间改进下。
2017-09-30 10:55 GMT+08:00 June [email protected]:
没有回调的啊~ 魅族pro6s
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexluthors/CompressTools-Android/issues/3#issuecomment-333277842, or mute the thread https://github.com/notifications/unsubscribe-auth/ARGB9srqEBdmcmCkhl25U_vnYhJpHaDkks5sna2qgaJpZM4Pmpvr .
博主有没有改进没有压缩成功回调的问题呢? 我的小米5S 还是这样的问题....
调起手机拍照回返回路径去压缩也有这个问题,Log显示Raw image not detected
10-13 15:02:21.643 14026-16992/com.emaotai.ysapp I/ExifInterface_JNI: Raw image not detected 10-13 15:02:21.644 14026-16992/com.emaotai.ysapp W/ExifInterface: Skip the tag entry since tag number is not defined: 2
失败应该增加失败通知回调
我使用Android 7.0.1 一加5手机测试
貌似Android7.x以上的手机都会显示Raw image not detected
使用的是最新的版本吗?
2017-10-11 23:49 GMT+08:00 马旸旸 [email protected]:
博主有没有改进没有压缩成功回调的问题呢? 我的小米5S 还是这样的问题....
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexluthors/CompressTools-Android/issues/3#issuecomment-335856560, or mute the thread https://github.com/notifications/unsubscribe-auth/ARGB9vg1OZ1MqUxg3RepinNeRq2s9svvks5srOOagaJpZM4Pmpvr .
检查一下你的动态权限。
2017-11-03 7:19 GMT+08:00 ohyeah521 [email protected]:
貌似Android7.x以上的手机都会显示Raw image not detected
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexluthors/CompressTools-Android/issues/3#issuecomment-341586339, or mute the thread https://github.com/notifications/unsubscribe-auth/ARGB9jHArQXFyKAQVWLjJRRovmlPlTEAks5syk3lgaJpZM4Pmpvr .