Example #1
0
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      ADOT4J4A adot4j4a = (ADOT4J4A) getActivity().getApplicationContext();

      ConfigurationBuilder confbuilder = new ConfigurationBuilder();
      confbuilder.setOAuthConsumerKey(ADOT4J4A.CONSUMER_KEY);
      confbuilder.setOAuthConsumerSecret(ADOT4J4A.CONSUMER_SECRET);
      confbuilder.setOAuthAccessToken(adot4j4a.getToken());
      confbuilder.setOAuthAccessTokenSecret(adot4j4a.getTokenSecret());
      mTwitter = new TwitterFactory(confbuilder.build()).getInstance();
    }
Example #2
0
 @Override
 public void onResume() {
   ADOT4J4A adot4j4a = (ADOT4J4A) getActivity().getApplicationContext();
   mHasAccount = adot4j4a.hasToken();
   super.onResume();
 }