Ejemplo n.º 1
0
 @Override
 protected void onPreExecute() {
   super.onPreExecute();
   // here iam giving a code of 1 to this event. Therefore i can check the event received by
   // the subscribers to see if the code is exactly to 1 before processing the event
   VideoSingleton.getInstance()
       .postMsg(new VideoChosenEvent(VideoChosenEvent.VideoSelected.PROGRESS_BAR, 1));
 }
Ejemplo n.º 2
0
  @Override
  protected void onPostExecute(String newVideoPath) {
    super.onPostExecute(newVideoPath);
    Log.d(TAG, "done newVideoPath: " + newVideoPath);

    if (newVideoPath != null) { // return is the value return by the doInBackground() method
      VideoSingleton.getInstance()
          .postMsg(
              new VideoChosenEvent(
                  VideoChosenEvent.VideoSelected.VIDEO_FOLDER_PATH, mVideFolderPath, newVideoPath));
    } else {
      VideoSingleton.getInstance()
          .postMsg(
              new ErrorEvent(
                  ErrorEvent.VideoError.ERROR_MERGING, "THIS VIDEO CAN NOT BE TRIMMED..."));
    }
  }