예제 #1
0
		public void run() {
			thread = Thread.currentThread();
			su.setInProgress(true);

			runTask();

			cleanUp();
		}
예제 #2
0
  /** {@inheritDoc} */
  @Override
  public void uploadImage(
      String message,
      String filePath,
      final SocialCallbacks.SocialActionListener socialActionListener) {
    if (!isInitialized) {
      return;
    }

    SoomlaUtils.LogDebug(TAG, "uploadImage");

    RefProvider = getProvider();
    RefSocialActionListener = socialActionListener;

    preformingAction = ACTION_UPLOAD_IMAGE;

    try {
      StatusUpdate updateImage = new StatusUpdate(message);
      updateImage.media(new File(filePath));
      twitter.updateStatus(updateImage);
    } catch (Exception e) {
      failListener(ACTION_UPLOAD_IMAGE, e.getMessage());
    }
  }
예제 #3
0
	void error(StatusUpdate su, String message) {
		status(su, StatusUpdate.LEVEL_GENERIC, message);
		su.error(message);
	}
예제 #4
0
	void status(StatusUpdate su, int level, String message) {
		Log.log(Log.LEVEL_INFO, MODULE, message);
		su.updateProgressStatus(level, message);
	}
예제 #5
0
		public void cleanUp() {
			su.setInProgress(false);
			terminated = true;
		}