Closed jagatappv closed 8 years ago
Could you put logs and see on both Activity's and Fragment's onActivityResult parts, to see if it is getting called in any one of them?
Hey,
thanks for replay
I have putted log inside both Activity and Fragment 's onActivityResult
I have called the code from fragment and receive result in activity's method.
How can i used within fragment??
Let me add my code that i am calling from fragment,
private void chooseImage() { int chooserType = ChooserType.REQUEST_PICK_PICTURE; imageChooserManager = new ImageChooserManager(this, ChooserType.REQUEST_PICK_PICTURE, "myfolder", true); imageChooserManager.setImageChooserListener(this); try { //pbar.setVisibility(View.VISIBLE); filePath = imageChooserManager.choose();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
Have you implemented onSaveInstance and onRestore? May be your activity is getting killed? Put logs in your onDestroy methods to confirm.
I have added My fragment inside one activity. So i am sure its not killed, otherwise the fragment itself killed and onRestoreInstance not worked for fragment.
Could you post some logs?
Sorry , But i am not getting any log. I just have call above code (chooseImage()) ,i have select image from gallery, then i am not getting any result from onActivitiResult .
Can you try out the sample and look at the source for the fragment example? Closing this for now. Please open a new one if the issue persists.
Hey,
I have tried this library.
Working fine with activity.
Now i have to use this library in fragment but its not returning result.
Can you help me to integrate this with fragment?
Thanks