Open Sharj opened 9 years ago
Should work just fine with 21. Any logs? I am suspecting that you might not be logging some exceptions. Can you post some code snippets?
It wasn't showing any error when checking adb logcat :E - Now I checked log with :D and it shows error (FileNotFoundException) and some other information:
I/ImageChooserManager(24758): File: content://com.android.providers.media.documents/document/image%3A120 I/MediaProcessorThread(24758): Directory size: 393556 I/ImageProcessorThread(24758): Processing Image File: content://com.android.providers.media.documents/document/image%3A120 I/MediaProcessorThread(24758): Image Uri: content://com.android.providers.media.documents/document/image%3A120 I/MediaProcessorThread(24758): Google photos Started I/MediaProcessorThread(24758): URI: content://com.android.providers.media.documents/document/image%3A120 I/MediaProcessorThread(24758): Extension: .jpg I/MediaProcessorThread(24758): Display Name: 1422058985060_fact_2.jpg I/MediaProcessorThread(24758): Size: 99659 W/System.err(24758): java.io.FileNotFoundException: No such file or directory W/System.err(24758): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146) W/System.err(24758): at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:689) W/System.err(24758): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1080) W/System.err(24758): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:921) W/System.err(24758): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:778) W/System.err(24758): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:733) W/System.err(24758): at com.kbeanie.imagechooser.threads.MediaProcessorThread.processGooglePhotosMedia(MediaProcessorThread.java:376) W/System.err(24758): at com.kbeanie.imagechooser.threads.ImageProcessorThread.processImage(ImageProcessorThread.java:98) W/System.err(24758): at com.kbeanie.imagechooser.threads.ImageProcessorThread.run(ImageProcessorThread.java:57) W/System.err(24758): java.io.FileNotFoundException: No such file or directory W/System.err(24758): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146) W/System.err(24758): at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:689) W/System.err(24758): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1080) W/System.err(24758): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:921) W/System.err(24758): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:778) W/System.err(24758): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:733) W/System.err(24758): at com.kbeanie.imagechooser.threads.MediaProcessorThread.processGooglePhotosMedia(MediaProcessorThread.java:376) W/System.err(24758): at com.kbeanie.imagechooser.threads.ImageProcessorThread.processImage(ImageProcessorThread.java:98) W/System.err(24758): at com.kbeanie.imagechooser.threads.ImageProcessorThread.run(ImageProcessorThread.java:57)
It is not able to find photo files that I have taken with camera and saved while It works fine with photos that I have saved from the internet. Any idea why it's not able to find files?
I have the same issue
2-12 11:50:20.128 30571-30571/com.com.com I/ImageChooserManager﹕ File: content://com.android.providers.media.documents/document/image%3A7465
02-12 11:50:20.134 30571-30571/com.com.com I/com.com.com.ui.drawer.DrawerFragment﹕ onresume
02-12 11:50:20.144 30571-30597/com.com.com V/GAV4﹕ Thread[GAThread,5,main]: Loaded clientId
02-12 11:50:20.148 30571-31382/com.com.com I/MediaProcessorThread﹕ Directory size: 39510001
02-12 11:50:20.151 30571-30618/com.com.com I/Adreno-EGL﹕
Thanks for the logs. I would look into this soon.
any update for lollipop ? i get null every time when i picked up image from gallery or photos
i get null after shooting a picture and press on Save. OnActivityResult I get data = null
I have this issue too
Are you saving the state, and reinitializing the chooser managers when the activity is destroyed? I am suspecting that is the issue here.
what i can't understand is, why it works with some mobiles and with some no, with some of the mobiles i do not get a null, while with another i get a null...
On 28 September 2015 at 08:12, Kumar Bibek notifications@github.com wrote:
Are you saving the state, and reinitializing the chooser managers when the activity is destroyed? I am suspecting that is the issue here.
— Reply to this email directly or view it on GitHub https://github.com/coomar2841/image-chooser-library/issues/53#issuecomment-143649224 .
This is because, if you activity gets killed, you will get a null value. So, it's important to save the states and reinitialize it when the activity is created again.
this happens when selecting camera, when choosing image it always works..
On 28 September 2015 at 11:25, Kumar Bibek notifications@github.com wrote:
This is because, if you activity gets killed, you will get a null value. So, it's important to save the states and reinitialize it when the activity is created again.
— Reply to this email directly or view it on GitHub https://github.com/coomar2841/image-chooser-library/issues/53#issuecomment-143688989 .
Sorry for being late. Is this still an issue? I am 100% sure that if you re-initialize the chooser managers, it should work for you. Please look at the sample app for the implementation.
I have used the library previously and It works like a charm.
Currently my application has targetSdkVersion 21 and testing application on Nexus 4 / 5.0.1 (API 21). I am calling pick photo from within a fragment like following
imageChooserManager = new ImageChooserManager(this, ChooserType.REQUEST_PICK_PICTURE); imageChooserManager.setImageChooserListener(this); imageChooserManager.choose();
after picking photo, I do get in onActivityResult and imageChooserManager.submit(requestCode, data) is called but I never get any error in log or callback to onImageChosen or onError. I have checked the content of data and I get correct URI of image from data.getData().toString().
After it didn't work, I tested the same application on Nexus 7/4.4/API 19 and It worked there. I see library is complied with targetSdkVersion 20. Are there any known issues with library working on API 21?