giantss / cordova-plugin-imagepicker Goto Github PK
View Code? Open in Web Editor NEW🔥cordova相册仿微信多选插件
License: MIT License
🔥cordova相册仿微信多选插件
License: MIT License
版本:
node v8.7.0
npm v5.4.2
cordova v8.0.0
cordova-android v7.1.0
执行cordova build android
会提示这样的错误:
cp: copyFileSync: could not write to dest file (code=ENOENT): /platforms/android/res/xml/config.xml
尝试新建一个 config.xml ,结果还是会报错。
是因为 cordova-android
的版本不正确吗?应该换到 [email protected]
?
Does this plugin require any additional English translation? Or does it automatically use the language in phone? The screenshot images in ReadMe shows in Chinese I think. All of my users are English so when they select photos from their album, will the texts be in English (as in their default phone language) or Chinese?
Thank you.
PT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
FAILURE: Build failed with an exception.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/caizepeng/Library/Android/sdk/build-tools/25.0.0/aapt'' finished with non-zero exit value 1
BUILD FAILED
Total time: 14.694 secs
安装插件后执行cordova-plugin-android报错了
I tested this from iOS so far. When I upload an image from Album, the uploaded image quality is very poor. I even tried these:
added quality: 100
to options
Selected "Full image" when selecting images from Camera Roll
The results log shows filepath as:
"/Users/me/Library/Developer/CoreSimulator/Devices/D53A2E22-A48F-470D-A1A4-BA3C2F992FE4/data/Containers/Data/Application/BA666A51-B3FF-47EF-BA03-4CA3AE59BA54/Documents/iIMG_0002.jpg"
After the image is selected, I pass the above fileURI and upload to server using File Transfer plugin. It appears only the thumbnail quality of the image is uploaded and not the high quality image from Phone Album.
How can I fix this please?
1,如果使用的cordova plugin add cordova-plugin-imagepicker-plus
安装的不能使用(不是我本人在维护),可以换cordova plugin add https://github.com/giantss/cordova-plugin-ImagePicker.git
安装试试。
2,提交新的issues的时候尽量提供详细点的信息,比如使用平台、系统版本、手机型号、现象描述等信息,如果能提供报错信息最好,感谢大家的支持。
App crash when select image with xiaomi5.
在ImageDataSource.java 中修改
//回调接口,通知图片数据准备完成
ImagePicker.getInstance().setImageFolders(imageFolders);
loadedListener.onImagesLoaded(imageFolders);
if(loaderManager.getLoader(LOADER_ALL)!=null){
loaderManager.destroyLoader(LOADER_ALL);
}
问题解决
Everything works great. I have one small issue with localized string.
In iOS, I cannot find where to update this string "拍照". It is under the camera icon.
For Android, I can find and replace all the strings without problem.
Thank you.
网上搜索排第一的同类插件都可以,希望复制一下。。。。
我直接根据wiki里的用法
ImagePicker.getPictrues()
然后cordova运行起来报错,错误信息是ImagePicker对象未定义。
然后我又尝试了下
window.plugins.ImagePicker
还是不行
上个项目用完全没问题,昨天新项目安装这个插件后 打开app就闪退 ,remove插件后app就能正常运行
如题
之前使用没问题,添加了 下面两个插件后,选取相册app闪退(您开发的插件很棒,满足了我项目需求,谢谢)
cordova-plugin-app-version
cordova-plugin-file-opener2
ionic3可以直接用吗?
[[PHImageManager defaultManager] requestImageDataForAsset:asset options:option resultHandler: .. 即使参数PHAsset是个gif内容
但是返回的还是一个jpg图片的NSData
可以参考:
先设置gif的temp位置(url),然后用
IOS11原图上传的时候显示1.7M,但是通过请求抓包发现上传了11M还多。。。。
在imagePickerMain.m文件中修改了_enablePickingVideo为true,是不插件返回那里就只返回了图片的url?
还有我想支持视频也能多选,这里面可以修改吗?麻烦指教下,给一个思路,刚接触OC没多久,希望大神给个方案,谢谢!
E:\WorkSpace\IONIC-Pro\web-one\platforms\android\build\intermediates\manifests\full\armv7\debug\AndroidManifest.xml:40: error: Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
微信里面拍照按钮在左上角第一个,能不能调整?
rt
除了“拍摄照片” 按钮,能否再加一个“连续拍摄照片”按钮及功能?
thx!
AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored
Does this plugin work with Android 7 or should I be using 6.3.0 or 6.4.0?
你把我的Pull request合并了,然后又把我的代码revert了,所以最新的代码ios的图片还是有问题
下面是一些片段
Error: /Users/guodapeng/Documents/Cordova/skateboard/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/guodapeng/Documents/Cordova/skateboard/platforms/android/res/drawable/selector_back_press.xml:4:29-46: AAPT: No resource found that matches the given name (at 'drawable' with value '@color/theme_body').
和
Error: /Users/guodapeng/Documents/Cordova/skateboard/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/guodapeng/Documents/Cordova/skateboard/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:66:35-54: AAPT: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths').
但是治好了这些后。我还是遇到了一些问题
Error: /Users/guodapeng/Documents/Cordova/skateboard/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/guodapeng/Documents/Cordova/skateboard/platforms/android/src/com/giants/imagepicker/adapter/ImageFolderAdapter.java:41: 错误: -source 1.6 中不支持 diamond 运算符
else imageFolders = new ArrayList<>();
^
(请使用 -source 7 或更高版本以启用 diamond 运算符)
这个问题我觉得可能是我的问题。
非常感谢能贡献出这个插件。
抱歉的是,我 Android 和 iOS 实在不懂,没办法帮助修复这个。
我很辛运,我在想写一个这样的插件时看到了这个。
Is this plugin only for selecting Images or does it select Videos from Album as well? I only need images to be selected and in other plugins I usually need to add an option like:
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
Do I need any setting like that for this plugin or it only lists and selects images only as default?
RT,这个错误我请了安卓的同事分析了下,暂时找不出原因
如题
There is a ImageCrop library used in the source code, but how to use cropping function?
谢谢
进入相册后,选择图片,程序闪退
on Android selecting image result is /data/user/0/[package_name]/cacheCompressHelper/IMG_xyz.jpeg
then call resolveLocalFileSystemURL but got error code 1 (not found).
I check in explorer also doesn't seem to find this cache location?
Other than that this plugin looks great. Thank you.
`
declare let cordova :any;
@component({
})
cordova.plugins.ImagePicker.getPictures(function (result) {
alert(result);
}, function (err) {
alert(err);
}, {maximumImagesCount: 9, width: 1920, height: 1440, quality: 100});
`
楼主,这样调用报错, 我自定义自己的插件这样调用没有问问题
I noticed that when you go to the Album and then press Cancel without selecting an image, an error is not returned when no image is obtained. This is the code I have:
ImagePicker.getPictures(function(results) {
console.log(results);
}, function (error) {
console.log('Error: ' + error);
alert("Unable to obtain pictures");
}, options);
In the above, when the image selection is cancelled, I thought I should get the Unable to obtain pictures
alert but that doesn't work. Neither the success nor the error method is triggered when cancelled. This is the same in both iOS and Android App. How can I handle this event?
This is my ionic info:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic1 1.3.3
System:
ios-deploy : 1.9.2
ios-sim : 5.0.13
Node : v9.3.0
npm : 5.7.1
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I wrap my code in a service so I need to return a promise with success or error. Since cancel doesn't trigger anything, I am unable to complete it when user cancels the image selection from album.
Is it possible to add this please? May I ask how long it might take to add this in?
Thank you so much for this awesome plugin. I love the fact that you can also select camera from the image picker which is really great.
Thanks,
Neel.
使用该插件得到的path在读取时候如下,跳到fail,code:5
window.resolveLocalFileSystemURL(path, gotFile, fail);
是哪里错误了吗?
删除crosswalk插件后,可以正常使用,否则点击图片多选框或者点击预览图片后,在预览图片里选中图片再返回一样闪退重启
platform: android7.0
已按照readme中写的尝试了所有的改动,还是闪退。。
且本身机器中没有装barcodescanner 所以也就没有patient-barcodescanner.gradle
调试了很久这句代码,同样的图片,imageData的值差距很大,会变化
imageData = UIImagePNGRepresentation(currentImage);
作者大大,你好 能不能提供0.1.0最后一次更新的版本呢?对安卓影响略大,暂时没时间折腾原来的轮子。。
最好是能迭代一下版本号,根据版本号升级插件,。感谢~!!!
我装了这个插件之后,jmessage-phonegap-plugin这个插件失效了
解决办法:ImageGridActivity.java中
@OverRide
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
// 按下BACK,同时没有重复
//Log.d(WZLOG, "onKeyDown()");
}
return super.onKeyDown(keyCode, event);
}
@OverRide
public void onBackPressed() {
//Log.d(WZLOG, "onBackPressed()");
super.onBackPressed();
}
选择图片的时候闪退,拍照都OK。卸载了二维码插件还是不行~
我想将选择的图片拷到别的地方去,通过些插件获取到的图片地址是:/data/user/0/io.ionic.starter/cacheCompressHelper/IMG_20171228_095307.jpeg,在使用$cordovaFile.copyFile()时,无论是直接用这个地址还是在这个地址前加了file://,都无法拷贝,返回NOT_FOUND_ERR。
请问我该怎么办?
:CordovaLib:compileReleaseJavaWithJavacע: ijЩ�����ļ�ʹ�û����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:javaPreCompileRelease
:compileReleaseJavaWithJavacD:\gc_app\platforms\android\src\com\giants\imagepicker\adapter\ImageFolderAdapter.java:59: ����: -source 1.6 �в�֧�� diamond �����
else imageFolders = new ArrayList<>();
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
D:\gc_app\platforms\android\src\com\giants\imagepicker\adapter\ImageGridAdapter.java:49: ����: -source 1.6 �в�֧�� diamond �����
private ArrayList images = new ArrayList<>(); //��ǰ��Ҫ��ʾ�����е�ͼƬ����
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
D:\gc_app\platforms\android\src\com\giants\imagepicker\adapter\ImagePageAdapter.java:32: ����: -source 1.6 �в�֧�� diamond �����
private ArrayList images = new ArrayList<>();
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
D:\gc_app\platforms\android\src\com\giants\imagepicker\adapter\ImageRecyclerAdapter.java:71: ����: -source 1.6 �в�֧�� diamond �����
if (images == null || images.size() == 0) this.images = new ArrayList<>();
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
D:\gc_app\platforms\android\src\com\giants\imagepicker\DataHolder.java:35: ����: -source 1.6 �в�֧�� diamond �����
data = new HashMap<>();
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
D:\gc_app\platforms\android\src\com\giants\imagepicker\ImageDataSource.java:37: ����: -source 1.6 �в�֧�� diamond �����
private ArrayList imageFolders = new ArrayList<>(); //���е�ͼƬ�ļ���
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
D:\gc_app\platforms\android\src\com\giants\imagepicker\ImagePicker.java:76: ����: -source 1.6 �в�֧�� diamond �����
private ArrayList mSelectedImages = new ArrayList<>(); //ѡ�е�ͼƬ����
^
(��ʹ�� -source 7 ����߰汾������ diamond �����)
7 ������
FAILED
FAILURE: Build failed with an exception.
PS D:\cordova_project\telem> cordova build android
(node:11872) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'text' of null
at updateProjectAccordingTo (D:\cordova_project\telem\platforms\android\cordova\lib\prepare.js:174:51)
at D:\cordova_project\telem\platforms\android\cordova\lib\prepare.js:47:16
at _fulfilled (D:\cordova_project\telem\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (D:\cordova_project\telem\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (D:\cordova_project\telem\platforms\android\cordova\node_modules\q\q.js:816:13)
at D:\cordova_project\telem\platforms\android\cordova\node_modules\q\q.js:570:49
at runSingle (D:\cordova_project\telem\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\cordova_project\telem\platforms\android\cordova\node_modules\q\q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:150:11)
at Function.Module.runMain (module.js:703:11)
(node:11872) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11872) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
rt
新建一个cordova项目,引入ImagePick插件,工作正常
再引入crosswalk,选图时崩溃
➜ testApp cordova plugin ls
cordova-plugin-ImagePicker 0.1.0 "ImagePicker"
cordova-plugin-crosswalk-webview 2.3.0 "Crosswalk WebView Engine"
cordova-plugin-whitelist 1.3.2 "Whitelist"
你好,
非常感谢你能开源这个插件,我才接触cordova,正发愁怎么同时实现多选图片和拍照功能就找到这个插件了。
我有个问题,怎么样能够自定义主题呢?我的APP顶栏不是黑色背景,以后也可能会换颜色,希望能指点一下。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.