Closed cokeby190 closed 10 years ago
That means that you probably initiated the ChooserManager with a certain type (say ChooseImage), and you are not submitting the data (chooserManager.submit), with a different type (say ChooseVideo).
You can log near the submit call and see what is getting passed as the type..
Any idea if this error comes about when the ChooserManager is reintialized, like in this portion :
if (imageChooserManager == null) { reinitializeImageChooser(); }
or if its from this line instead :
if(requestCode == ChooserType.REQUEST_PICK_PICTURE || requestCode == ChooserType.REQUEST_CAPTURE_PICTURE) {
Because the error came from a particular user, and I never see this error myself. So its tougher to debug. ):
Yeah, reinitialize is the suspected location. You could have the dev settings (Kill Activities) on, and reproduce it reliably on any device.
When an chooserManager is null, you will need to reinitialize it with the proper type, else you will see this error.
I left out the onSaveInstanceState method, my bad. Once I added it in, its fine now (: Thanks for the help. :D
Can you tell me how can i use onSaveInstanceState and onRestoreInstanceState with Fragments??
Thanks in advance
Got this error :
"onActivityResult requestCode is different from the type the chooser was initialized with."
on Samsung S3 device,
for requestCode : ChooserType.REQUEST_PICK_PICTURE OR ChooserType.REQUEST_CAPTURE_PICTURE
when trying to take picture / choose from Gallery.
Any idea what could have been causing it?