RTEditor/src/main/java/com/onegravity/rteditor/media/choose/MediaChooserActivity.java
@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode == Activity.RESULT_OK) {

            if (requestCode == MediaAction.PICK_PICTURE.requestCode() && data != null) {
                mMediaChooserMgr.processMedia(MediaAction.PICK_PICTURE, data);
            } else if (requestCode == MediaAction.CAPTURE_PICTURE.requestCode()) {
                mMediaChooserMgr.processMedia(MediaAction.CAPTURE_PICTURE, data);    // data may be null here
            } else if (requestCode == Constants.CROP_IMAGE) {
                String path = data.getStringExtra(CropImageActivity.IMAGE_DESTINATION_FILE);
                if (path != null && mSelectedMedia instanceof RTImage) {
                    EventBus.getDefault().postSticky( new MediaEvent(mSelectedMedia) );
                    finish();
                }
            }

        } else {
            setResult(RESULT_CANCELED);
            finish();
        }
    }
@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode == Activity.RESULT_OK) {

            if (requestCode == MediaAction.PICK_PICTURE.requestCode() && data != null) {
                mMediaChooserMgr.processMedia(MediaAction.PICK_PICTURE, data);
            } else if (requestCode == MediaAction.CAPTURE_PICTURE.requestCode()) {
                mMediaChooserMgr.processMedia(MediaAction.CAPTURE_PICTURE, data);    // data may be null here
            } else if (requestCode == Constants.CROP_IMAGE) {
                String path = data.getStringExtra(CropImageActivity.IMAGE_DESTINATION_FILE);
                if (path != null && mSelectedMedia instanceof RTImage) {
                    EventBus.getDefault().postSticky( new MediaEvent(mSelectedMedia) );
                    finish();
                }
            }

        } else {
            setResult(RESULT_CANCELED);
            finish();
        }
    }
@ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { if ( resultCode == Activity . RESULT_OK ) { if ( requestCode == MediaAction . PICK_PICTURE . requestCode ( ) && data != null ) { mMediaChooserMgr . processMedia ( MediaAction . PICK_PICTURE , data ) ; } else if ( requestCode == MediaAction . CAPTURE_PICTURE . requestCode ( ) ) { mMediaChooserMgr . processMedia ( MediaAction . CAPTURE_PICTURE , data ) ; // data may be null here } else if ( requestCode == Constants . CROP_IMAGE ) { String path = data . getStringExtra ( CropImageActivity . IMAGE_DESTINATION_FILE ) ; if ( path != null && mSelectedMedia instanceof RTImage ) { EventBus . getDefault ( ) . postSticky ( new MediaEvent ( mSelectedMedia ) ) ; finish ( ) ; } } } else { setResult ( RESULT_CANCELED ) ; finish ( ) ; } }
****************************************** Listener Methods *******************************************
****************************************** Listener Methods *******************************************