ihorklimov / smartimagepicker Goto Github PK
View Code? Open in Web Editor NEW[Unsupported] Simplest way to pick, crop images on Android from camera or gallery
[Unsupported] Simplest way to pick, crop images on Android from camera or gallery
There is no method for multiple image selection.
Two apps using the library cannot be installed on one device. The <provider>
in the library's manifest file has authorities
which needs to be exclusive for every app.
When select the image and open crop the image, doesnt exists a button or something to done and return the image,
hi !
after picking an image from gallery or camera i got "java.lang.RuntimeException: Unable to start activity ComponentInfo{co.lyan.lyandroid/com.theartofdev.edmodo.cropper.CropImageActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class com.linchaolong.android.imagepicker.cropper.CropImageView " error message .
how can fix it ?
The issue is every time the rear camera gets launched. How to open front camera by default? Please anyone can guide me here
java.lang.SecurityException: Permission Denial: opening provider com.myhexaville.smartimagepicker.CustomFileProvider from ProcessRecord{436b0a00 15507:com.sec.android.app.camera/u0a76} (pid=15507, uid=10076) that is not exported from uid 10134
I don't know if it's by design and you forgot to mention it, but when calling (Kotlin code) :
imagePicker = ImagePicker(this, null, { uri -> imagePicker.getImageFile() // null } ) imagePicker?.choosePicture(true)
getImageFile() returns null. In fact in your code you only set imageFile when used with the crop activity.
Nowhere you mention this fact, you simply say that to get the file, we should call getImageFile()
How can I change camera destination folder?
I found a function in your code
private Intent getCameraIntent()
And there is generation of the file
Can you make an option to set custom destination path (and I suppose with custom fileprovider authority)?
When trying to select image, Android first asks for permissions (write?) and I accept. But then I can not select an image:
11-13 14:24:16.265 4183-5697/? E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/file from pid=4092, uid=10050 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:483)
at android.content.ContentProvider$Transport.query(ContentProvider.java:212)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
at android.os.Binder.execTransact(Binder.java:565)
Also - using the crop built in, shows the image and crop but there is no way to proceed/save once resized in the cropper?
Every time we select an image after cropping it, a file with it's name like 'cropped12345.jpg' gets created in the internal cache directory of our app. The same file is visible in the gallery. Is there any way to delete the file from cache folder or hide them.?
Or should the ImagePicker create the same file in Context.MODE_PRIVATE.?
@IhorKlimov I would like to use your library in my application but there is no licence. Could you add a licence to this repo? Thank you.
While opening camera, i am getting FileUriExposedException.
When image is captured using camera, the camera crashed. Gallery picker is working fine.
05-27 14:45:15.592 6787-6787/com.myhexaville.androidimagepicker E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myhexaville.androidimagepicker, PID: 6787 java.lang.RuntimeException: Unable to resume activity {com.myhexaville.androidimagepicker/com.myhexaville.androidimagepicker.activity_example.ActivityExample}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=200, result=-1, data=null} to activity {com.myhexaville.androidimagepicker/com.myhexaville.androidimagepicker.activity_example.ActivityExample}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.myhexaville.smartimagepicker.ImagePicker.handleActivityResult(int, int, android.content.Intent)' on a null object reference at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3394) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3425) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2763) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4462) at android.app.ActivityThread.access$1000(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1454) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=200, result=-1, data=null} to activity {com.myhexaville.androidimagepicker/com.myhexaville.androidimagepicker.activity_example.ActivityExample}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.myhexaville.smartimagepicker.ImagePicker.handleActivityResult(int, int, android.content.Intent)' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:4058) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3380) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3425) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2763) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4462) at android.app.ActivityThread.access$1000(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1454) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.myhexaville.smartimagepicker.ImagePicker.handleActivityResult(int, int, android.content.Intent)' on a null object reference at com.myhexaville.androidimagepicker.activity_example.ActivityExample.onActivityResult(ActivityExample.java:31) at android.app.Activity.dispatchActivityResult(Activity.java:6549) at android.app.ActivityThread.deliverResults(ActivityThread.java:4054) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3380) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3425) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2763) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4462) at android.app.ActivityThread.access$1000(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1454) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
after I select the image in the gallery, but it does not appear in the imageview, but when in Activity can, if the fragment can not
just started getting an exception today :
Error:FAILURE: Build failed with an exception.
Could not resolve com.android.support:appcompat-v7:27.+.
Required by:
project :app > com.myhexaville:smart-image-picker:1.0.4 > com.theartofdev.edmodo:android-image-cropper:2.6.0
Could not resolve com.android.support:appcompat-v7:27.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar'.
> Read timed out
Error recieved on a HTC one X running 4.2.2 not sure on the resolution of the display, is this something we can handle or something you'd need to work on, let me know and I can provide logs where needed
when I call imagePicker.choosePicture(true); I have this error:
java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/*********/files/images/outputImage1529499833245.jpg
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:738)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:417)
at com.myhexaville.smartimagepicker.ImagePicker.getCameraIntent(ImagePicker.java:259)
at com.myhexaville.smartimagepicker.ImagePicker.startImagePickerActivity(ImagePicker.java:288)
at com.myhexaville.smartimagepicker.ImagePicker.choosePicture(ImagePicker.java:85)
When i am using image picker in multiple fragment windows get overlap multiple times
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.