public void resultPhoto(int requestCode,int resultCode,Intent data){
  if (resultCode == Activity.RESULT_OK) {
    if (requestCode == SELECT_PHOTO) {
      this.myPhoto=onSelectFromGalleryResult(data);
    }
 else     if (requestCode == TAKE_PHOTO) {
      this.myPhoto=onTakePhotoResult();
    }
    if (this.myPhoto != null) {
      if (ifCameraLandScape(true) == LANDSCAPE_CAMERA) {
        this.myPhoto=rotateImage(getMyPhoto(),270);
      }
    }
  }
}

public void resultPhoto ( int requestCode , int resultCode , Intent data ) { if ( resultCode == Activity . RESULT_OK ) { if ( requestCode == SELECT_PHOTO ) { this . myPhoto = onSelectFromGalleryResult ( data ) ; } else if ( requestCode == TAKE_PHOTO ) { this . myPhoto = onTakePhotoResult ( ) ; } if ( this . myPhoto != null ) { if ( ifCameraLandScape ( true ) == LANDSCAPE_CAMERA ) { this . myPhoto = rotateImage ( getMyPhoto ( ) , 270 ) ; } } } }
this methods is called in the override method onactivityresult for the respective activation , and this validate which of the intentn result be , for example : if is selected file or if is take picture
