I have a problem with onActionResult inside the class which subclassed of the DialogFragment. The onActionResult not get called but it call the Activity who start the DialogFragment.
The calling is this AppCompatActivity A -> DialogFragment -> AppCompatActivity B Expected result is AppCompatActivity B send result back to DialogFragment.
I have the same process as above but instead AppCompatActivity A, it was Fragment and that part work.
This is my code below to show DialogFragment:
if (getContext() instanceof AppCompatActivity) {
        FragmentManager manager = ((AppCompatActivity) getContext()).getSupportFragmentManager();
        AttachmentOptionDialog imgAttachment = AttachmentOptionDialog.newInstance(dialogListener);
        imgAttachment.setTargetFragment(imgAttachment, MobileConstant.newInstance().REQUEST_CODE_PROFILE_PHOTO);
        imgAttachment.show(manager, "");
    }
Calling the Activity B:
v.setEnabled(false);
            Intent intent = new Intent();
            intent.setClass(getActivity(), CameraActivity.class);
            startActivityForResult(intent, MobileConstant.newInstance().REQUEST_CODE_CAMERA);
 
     
    