CompressTools-Android icon indicating copy to clipboard operation
CompressTools-Android copied to clipboard

压缩图片没有走onSuccess的回调,压缩失败没有onCompressFailed()回调

Open alexykuan opened this issue 8 years ago • 13 comments

/** * 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的情况吧

alexykuan avatar Sep 28 '17 02:09 alexykuan

另外再提一点,多线程压缩没有所有完成的回调。希望博主改进哈。

alexykuan avatar Sep 28 '17 02:09 alexykuan

是个别手机有问题吗?还是所有的都有问题呢?

lexluthors avatar Sep 28 '17 05:09 lexluthors

我所测试的三星,小米,华为,模拟器都有此类问题,均无法成功压缩图片

alexykuan avatar Sep 28 '17 07:09 alexykuan

不可能吧,我测试的手机都成功了,你能不能把demo用邮箱发给我一份?

lexluthors avatar Sep 29 '17 07:09 lexluthors

检查一下传进去的file是否有效

lexluthors avatar Sep 29 '17 10:09 lexluthors

没有回调的啊~ 魅族pro6s

umeitime avatar Sep 30 '17 02:09 umeitime

你是集成进去的还是直接下载这个demo跑的?这个demo你试试能跑吗?

lexluthors avatar Oct 03 '17 02:10 lexluthors

谢谢反馈,我有时间改进下。

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 .

lexluthors avatar Oct 09 '17 02:10 lexluthors

博主有没有改进没有压缩成功回调的问题呢? 我的小米5S 还是这样的问题....

mayangyang-github avatar Oct 11 '17 15:10 mayangyang-github

调起手机拍照回返回路径去压缩也有这个问题,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手机测试

darin-lao avatar Oct 13 '17 07:10 darin-lao

貌似Android7.x以上的手机都会显示Raw image not detected

ohyeah521 avatar Nov 02 '17 23:11 ohyeah521

使用的是最新的版本吗?

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 .

lexluthors avatar Nov 10 '17 02:11 lexluthors

检查一下你的动态权限。

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 .

lexluthors avatar Nov 10 '17 02:11 lexluthors