@Override public ExternalApiResult afterActivityResult( int requestCode, int resultCode, Intent result, String method) { if ((METHOD_TAKE_PHOTO.equalsIgnoreCase(method) || METHOD_RECORD_VIDEO.equalsIgnoreCase(method)) && resultCode == Activity.RESULT_OK) { String mediaPath = MediaHelper.getTakenMediaUri( getActivity().getApplicationContext(), result, mOutputMediaFile) .getPath(); return new ExternalApiResult(ActionResult.SUCCESS_CONTINUE, mediaPath); } return null; }
@Override public @NonNull ExternalApiResult invoke(List<Object> parameters) { ActivityHelper.registerActionRequestCode(MediaHelper.CAPTURE_VIDEO); mOutputMediaFile = MediaHelper.captureVideo(getActivity()); return ExternalApiResult.SUCCESS_WAIT; }
@Override public @NonNull ExternalApiResult invoke(List<Object> parameters) { ActivityHelper.registerActionRequestCode(MediaHelper.TAKE_PICTURE); mOutputMediaFile = MediaHelper.takePicture(getActivity()); return ExternalApiResult.SUCCESS_WAIT; }