Comments (21)
from image_pickers.
一开始我保存成功了 ,去相册图库删除过,就那一次成功了,后面就都是失败 返回null,图片的链接是http的能显示
from image_pickers.
from image_pickers.
哦吼 我垃圾桶也清理过,还是失败的, 等待作者发布新的版本,感谢大佬
from image_pickers.
from image_pickers.
小米mix3 安卓10
from image_pickers.
from image_pickers.
好的 ,再次感谢大佬的插件和回复 👍 :)
from image_pickers.
image_pickers: ^2.0.4+6 版本发布了。还在审核中,稍后可以更新一下试试。或者直接使用github的依赖试试。
from image_pickers.
好的,使用后给反馈
from image_pickers.
I/Timeline(24564): Timeline: Activity_launch_request time:692186350
W/ActivityThread(24564): handleWindowVisibility: no activity for token android.os.BinderProxy@f5410e5
D/ViewContentFactory(24564): initViewContentFetcherClass
I/ContentCatcher(24564): ViewContentFetcher : ViewContentFetcher
D/ViewContentFactory(24564): createInterceptor took 0ms
2
D/ForceDarkHelper(24564): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: com.leeson.image_pickers.activitys.PermissionActivity@334f674
E/TAG (24564): saveImgToGallery: has file
E/TAG (24564): saveImgToGallery: 复制文件
I/flutter (24564): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (24564): │ 15:15:12.090 (+0:02:26.869550)
I/flutter (24564): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (24564): │ 🐛 null
I/flutter (24564): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/Timeline(24564): Timeline: Activity_launch_request time:692186413
W/ActivityThread(24564): handleWindowVisibility: no activity for token android.os.BinderProxy@6e205b
D/ViewContentFactory(24564): initViewContentFetcherClass
I/ContentCatcher(24564): ViewContentFetcher : ViewContentFetcher
D/ViewContentFactory(24564): createInterceptor took 0ms
2
D/ForceDarkHelper(24564): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: com.leeson.image_pickers.activitys.PermissionActivity@12885c2
E/TAG (24564): saveImgToGallery: has file
E/TAG (24564): saveImgToGallery: 复制文件
I/flutter (24564): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (24564): │ 15:15:12.147 (+0:02:26.925993)
I/flutter (24564): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (24564): │ 🐛 null
I/flutter (24564): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/Toast (24564): Show toast from OpPackageName:com.yongjiang.airobot, PackageName:com.yongjiang.airobot
作者你好这是最新插件的日志 目前还是发现删除后没有保存成功 返回为null,第一次是成功的然后删除,相册垃圾桶也删除了,再操作保存没有成功
但是可以重复保存的,下面的日志是重新找图然后进行重复保存,相册有2张重复照片操作成功
2
D/ForceDarkHelper(24564): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: com.leeson.image_pickers.activitys.PermissionActivity@400c7fb
E/TAG (24564): saveImgToGallery: has file
E/TAG (24564): saveImgToGallery: 复制文件
I/flutter (24564): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (24564): │ 15:16:42.021 (+0:03:56.799950)
I/flutter (24564): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (24564): │ 🐛 /storage/emulated/0/Pictures/66 (1).png
I/flutter (24564): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/Toast (24564): Show toast from OpPackageName:com.yongjiang.airobot, PackageName:com.yongjiang.airobot
from image_pickers.
我循环2张图片保存,成功后去相册删除了一张,再去重复的保存操作,成功为1张,删除的那张就不会保存了 ,日志返回为null
from image_pickers.
循环保存的代码能提供一下不?我测试一下
from image_pickers.
我就写了一个很简单的循环我感觉不是循环的问题,单个估计也这样,我又找了一个小米10的手机,安卓版本13的,也是同样的问题,我怀疑是不是小米特有的,别的机型我测了一下1+T ,华为 都没碰到这个问题
List imgList=[];
//imgList的值是接口给的
//下载图片
downImgs() async {
for (var item in imgList) {
var path = await ImagePickers.saveImageToGallery(item);
logD(path);
}
toast("保存成功".tr);
}
from image_pickers.
我测试了,小米10s安卓13没问题,红米 9 没问题,没找到小米10.
你看看能替换一下你本地的这个方法测试一下吗?
public void saveImgToGallery(final String saveUrl, final IFinishListener iFinishListener) {
final String fileName = saveUrl.substring(saveUrl.lastIndexOf("/") + 1);
String dirPath = appPath.getAppImgDirPath();
FileInfo fileInfo = null;
//判断文件是否下载过
final File file = new File(dirPath,fileName);
if (file.exists() && file.length() > 0){
Log.e("TAG", "saveImgToGallery: has file" );
fileInfo = new FileInfo();
fileInfo.setBeforeDownload(true);
fileInfo.setUri(PictureFileUtils.parUri(context,file));
fileInfo.setPath(file.getAbsolutePath());
fileInfo.setSize(file.length());
}
if (fileInfo != null && fileInfo.size > 0) {
Log.e("TAG", "saveImgToGallery: 复制文件" );
fileInfo = copyImgToPicture(fileInfo.getPath(), System.currentTimeMillis()+fileName);
notifyGallery(fileInfo.getPath());
if (iFinishListener != null) {
iFinishListener.onSuccess(fileInfo);
}
} else {
Log.e("TAG", "saveImgToGallery: 开始下载" );
download(saveUrl,dirPath , new IDownload() {
@Override
public void onDownloadSuccess(String filePath, String fileName) {
//下载到私有目录成功并复制到公有目录
FileInfo fileInfo = copyImgToPicture(filePath, fileName);
notifyGallery(fileInfo.getPath());
/*File originFile = new File(filePath);
originFile.delete();*/
if (iFinishListener != null) {
iFinishListener.onSuccess(fileInfo);
}
}
@Override
public void onDownloadFailed(String errorMsg) {
if (iFinishListener != null) {
iFinishListener.onFailed(errorMsg);
}
}
});
}
}
from image_pickers.
GitHub我提交了一下代码,或者 依赖一下GitHub的版本测试一下吧。测试机实在不好找
from image_pickers.
GitHub的版本 我测一下
from image_pickers.
GitHub的版本成功了,测了一下没问题了
from image_pickers.
辛苦大佬了,感谢解决问题,: ) 👍
from image_pickers.
互相学习。一会我发版本。说一下原因吧, 第二次存储时,因为图片的名称已经存在了,导致存储失败。而我手边的手机刚好 系统会自动重命名,太巧了。我用Google的模拟器 也是会 自动重命名的,所以一直没有出现问题。
from image_pickers.
您这么说我就发现了,,我这边的手机返回的path文件名字是一样的如果是重复文件会(1)这样命名类似window文件重复命名规则。感谢大佬的解释
from image_pickers.
Related Issues (20)
- NSInvalidArgumentException when calling ImagePickers.pickerPaths() HOT 4
- jcenter has been closed but it is used
- 图片稍微大一点,来回多点几次之后会一直转圈圈
- There is an issue with aligning when selecting multiple images. HOT 1
- Android选择图片闪退,必现 HOT 6
- Semantic Issue (Xcode): Property 'timeout' not found on object of type 'ZLPhotoConfiguration *' /Users/anmolgupta/.pub-cache/hosted/pub.dev/image_pickers-2.0.4+6/ios/Classes/ImagePickersPlugin.m:181:22 HOT 5
- IOS保存图片没反应 HOT 7
- 当手机断网但是选中icloud图片的时候会一直转圈「正在处理」
- 如果 你遇到 You need to use a Theme.AppCompat theme,请尝试 HOT 1
- Fatal Exception: java.lang.RuntimeException,In the firebase crash, the device information is Google Pixel 7 Pro Android 14 HOT 1
- It would be nice if I leaked out how to compress the picture HOT 2
- 插件冲突 HOT 10
- ios pod 最低版本和其它插件冲突
- GalleryMode.image 里面没有过滤掉视频
- 有没有对targetSdkVersion 30进行适配的版本。
- 引入再删除插件后ios构建失败了
- 安卓13,进入相册之后,不选择图片直接点击返回键,无法正常退出 HOT 2
- 从相机退出之后,app内所有页面都不能播放声音
- iOS Are there any plans to add Privacy Manifests?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image_pickers.