Example usage for twitter4j Paging maxId

List of usage examples for twitter4j Paging maxId

Introduction

In this page you can find the example usage for twitter4j Paging maxId.

Prototype

long maxId

To view the source code for twitter4j Paging maxId.

Click Source Link

Usage

From source file:com.joanzapata.android.twitter.service.TwitterService.java

License:Apache License

public List<Status> getTweetsBefore(String username, Status beforeTweet) {
    try {//from w ww  .  j a  va2  s . co  m
        final Paging paging = new Paging().count(TWEET_COUNT);
        if (beforeTweet != null)
            paging.maxId(beforeTweet.getId() - 1);
        final ResponseList<Status> userTimeline = twitter.getUserTimeline(username, paging);
        if (userTimeline == null)
            return new ArrayList<Status>();
        return userTimeline;
    } catch (TwitterException e) {
        Log.e(TAG, "", e);
        return null;
    }
}