Android Open Source - cheepcheep Follow Unfollow User Task From Project Back to project page cheepcheep .
License The source code is released under:
Apache License
If you think the Android project cheepcheep listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package org.tarrio.cheepcheep.task;
/ / w w w . j a v a 2 s . c o m
import org.tarrio.cheepcheep.R;
import org.tarrio.cheepcheep.exceptions.AuthError;
import org.tarrio.cheepcheep.exceptions.NetError;
import org.tarrio.cheepcheep.exceptions.ParseError;
import org.tarrio.cheepcheep.exceptions.UserNotFoundError;
import org.tarrio.cheepcheep.model.Preferences;
import android.app.Activity;
public class FollowUnfollowUserTask extends AsyncTwitterTask {
private String screenName;
private boolean follow;
public FollowUnfollowUserTask(Activity activity, Preferences prefs, TaskCallback callback, String screenName, boolean follow) {
super (activity, prefs, callback);
this.screenName = screenName;
this.follow = follow;
}
@Override
protected int getProgressMessageResource() {
if (follow)
return R.string.following_user;
else
return R.string.unfollowing_user;
}
@Override
protected void doBackground() throws NetError, ParseError,
AuthError, UserNotFoundError {
twitterService.changeFollowUser(screenName, follow);
}
}
Java Source Code List org.tarrio.cheepcheep.Constants.java org.tarrio.cheepcheep.HomeTimelineActivity.java org.tarrio.cheepcheep.OAuthActivity.java org.tarrio.cheepcheep.SingleTweetActivity.java org.tarrio.cheepcheep.TweetListActions.java org.tarrio.cheepcheep.TweetListAdapter.java org.tarrio.cheepcheep.UserInfoActivity.java org.tarrio.cheepcheep.dialog.CheepCheepDialog.java org.tarrio.cheepcheep.dialog.ConfirmDeleteTweetDialog.java org.tarrio.cheepcheep.dialog.NewTweetDialog.java org.tarrio.cheepcheep.exceptions.AuthError.java org.tarrio.cheepcheep.exceptions.CheepCheepException.java org.tarrio.cheepcheep.exceptions.NetError.java org.tarrio.cheepcheep.exceptions.ParseError.java org.tarrio.cheepcheep.exceptions.TweetNotFoundError.java org.tarrio.cheepcheep.exceptions.UserNotFoundError.java org.tarrio.cheepcheep.http.HttpClientFactory.java org.tarrio.cheepcheep.http.OAuthHttpClient.java org.tarrio.cheepcheep.model.Preferences.java org.tarrio.cheepcheep.model.Tweet.java org.tarrio.cheepcheep.model.User.java org.tarrio.cheepcheep.service.PreferencesProvider.java org.tarrio.cheepcheep.service.TwitterJSONSerializer.java org.tarrio.cheepcheep.service.TwitterService.java org.tarrio.cheepcheep.service.TwitterStatusSaverService.java org.tarrio.cheepcheep.task.AsyncTwitterTask.java org.tarrio.cheepcheep.task.CreateNewTweetTask.java org.tarrio.cheepcheep.task.DeleteTweetTask.java org.tarrio.cheepcheep.task.FollowUnfollowUserTask.java org.tarrio.cheepcheep.task.GetSingleTweetTask.java org.tarrio.cheepcheep.task.GetUserInfoTask.java org.tarrio.cheepcheep.task.TaskCallback.java org.tarrio.cheepcheep.task.UpdateTweetsTask.java org.tarrio.cheepcheep.task.VerifyCredentialsTask.java