Android Open Source - DreamInTweets Dream Application






From Project

Back to project page DreamInTweets.

License

The source code is released under:

Apache License

If you think the Android project DreamInTweets 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 nz.net.speakman.android.dreamintweets;
//from   w w w.  j  ava  2  s.c  o m
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.TwitterStream;
import twitter4j.TwitterStreamFactory;
import twitter4j.conf.Configuration;
import twitter4j.conf.ConfigurationBuilder;
import android.app.Application;

public class DreamApplication extends Application {

    private Twitter mTwitter;

    @Override
    public void onCreate() {
        super.onCreate();
        mTwitter = new TwitterFactory(getConf()).getInstance();
    }

    public Twitter getTwitter() {
        return mTwitter;
    }

    public TwitterStream getTwitterStream() {
        return new TwitterStreamFactory(getConf()).getInstance();
    }

    private static Configuration getConf() {
        ConfigurationBuilder cb = new ConfigurationBuilder();
        // Create a DreamTwitterConstants class with these fields and your
        // Consumer Key & Secret.
        // This file is excluded in the .gitignore in order to prevent
        // accidentally checking it in.
        cb.setOAuthConsumerKey(DreamTwitterConstants.CONSUMER_KEY);
        cb.setOAuthConsumerSecret(DreamTwitterConstants.CONSUMER_SECRET);
        return cb.build();
    }
}




Java Source Code List

nz.net.speakman.android.dreamintweets.DreamApplication.java
nz.net.speakman.android.dreamintweets.activities.DreamActivity.java
nz.net.speakman.android.dreamintweets.activities.MainActivity.java
nz.net.speakman.android.dreamintweets.activities.SignInActivity.java
nz.net.speakman.android.dreamintweets.daydream.Jumper.java
nz.net.speakman.android.dreamintweets.daydream.TweetDream.java
nz.net.speakman.android.dreamintweets.fragments.LicensesFragment.java
nz.net.speakman.android.dreamintweets.preferences.DreamPreferences.java
nz.net.speakman.android.dreamintweets.text.DreamLinkMovementMethod.java
nz.net.speakman.android.dreamintweets.text.TextViewLinkHider.java
nz.net.speakman.android.dreamintweets.twitterstream.TwitterStreamAdapter.java
nz.net.speakman.android.dreamintweets.twitterstream.TwitterStreamListener.java
nz.net.speakman.android.dreamintweets.widget.TouchImageView.java