Android Open Source - ItsTwitterTime Tweet






From Project

Back to project page ItsTwitterTime.

License

The source code is released under:

Copyright (c) 2014, Saghm Rossi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * ...

If you think the Android project ItsTwitterTime 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 me.saghm.itstwittertime;
//  w  w  w.ja v  a2s .  c o  m
import twitter4j.Status;
import twitter4j.User;

class Tweet {
    private String user;
    private String text;
    //private String sourceURL;
    private long statusId;
    private long userId;

    public Tweet(Status status) {
      user      = "@" + status.getUser().getScreenName();
      text      = status.getText();
      statusId  = status.getId();
        userId    = status.getUser().getId();
    }

    public String getUsername() { return user; }
    public String getText()     { return text; }
    public long getStatusId()   { return statusId; }
    public long getUserId()     { return userId; }

    @Override
    public String toString() {
      return String.format("Tweet(user=\"%s\", text=[%s], id=%d)",
                user, text, getStatusId());
    }

//    private String getImageURLFromStatus(Status status) {
//        String[] words = status.toString().split("\\s+");
//        String found;
//
//        for (String word: words) {
//            if (!word.startsWith("mediaURL=")) continue;
//            found = word.replaceFirst("mediaURL=", "");
//            found = found.substring(0, found.length() - 1);
//
//            return found;
//        }
//
//        return "";
//    }
}




Java Source Code List

me.saghm.itstwittertime.ApplicationTest.java
me.saghm.itstwittertime.AuthTask.java
me.saghm.itstwittertime.Connector.java
me.saghm.itstwittertime.ExceptionParser.java
me.saghm.itstwittertime.GetUserTask.java
me.saghm.itstwittertime.LoginTask.java
me.saghm.itstwittertime.Start.java
me.saghm.itstwittertime.Start.java
me.saghm.itstwittertime.Tweet.java