I have the following code in my onActivityResult for a fragment of mine:
onActivityResult(int requestCode, int resultCode, Intent data){ //other code P
It's an old question but I've solved by the simplest way, I think:
getActivity().runOnUiThread(new Runnable() { @Override public void run() { MsgUtils.toast(getString(R.string.msg_img_saved), getActivity().getApplicationContext()); } });