replacing Fragment inside onActivityResult() geting error
Posted
by
ajay
on Stack Overflow
See other posts from Stack Overflow
or by ajay
Published on 2012-11-21T10:43:36Z
Indexed on
2012/11/21
11:00 UTC
Read the original article
Hit count: 261
android-fragments
When am lancing camera using
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, CAMERA_REQUEST);)
And then we getting callback after taking pic to the
onActivityResult(){
//HERE AM CALL ING ANOTHER FRAGMENT
FragmentManager fm = getFragmentManager();
fm.beginTransaction().replace( R.id.tab_upload, new uploadingActivty(), "tabId").setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.addToBackStack(null).commit();
}
Then we getting error as
11-21 16:13:44.316: E/AndroidRuntime(30944): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Any idea?
© Stack Overflow or respective owner