예제 #1
0
  @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;
  }
예제 #2
0
 @Override
 public @NonNull ExternalApiResult invoke(List<Object> parameters) {
   ActivityHelper.registerActionRequestCode(MediaHelper.CAPTURE_VIDEO);
   mOutputMediaFile = MediaHelper.captureVideo(getActivity());
   return ExternalApiResult.SUCCESS_WAIT;
 }
예제 #3
0
 @Override
 public @NonNull ExternalApiResult invoke(List<Object> parameters) {
   ActivityHelper.registerActionRequestCode(MediaHelper.TAKE_PICTURE);
   mOutputMediaFile = MediaHelper.takePicture(getActivity());
   return ExternalApiResult.SUCCESS_WAIT;
 }