Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Put this code that was at the end of onCreate() to onResume() with my changes:</p> <pre><code>Uri uri = getIntent().getData(); if (uri != null &amp;&amp; uri.toString().startsWith(TWITTER_CALLBACK_URL)) { uri.getQueryParameter(URL_TWITTER_OAUTH_VERIFIER); try { AccessToken accessToken = twitter.getOAuthAccessToken(requestToken); Editor e = mSharedPreferences.edit(); e.putString(PREF_KEY_OAUTH_TOKEN, accessToken.getToken()); e.putString(PREF_KEY_OAUTH_SECRET, accessToken.getTokenSecret()); e.putBoolean(PREF_KEY_TWITTER_LOGIN, true); e.commit(); Log.e("Twitter OAuth Token", "&gt; " + accessToken.getToken()); } catch (Exception e) { Log.e("Twitter Login Error", "&gt; " + e.getMessage()); } } if (!isTwitterLoggedInAlready()) { // Goto TweetsListActivity Intent intent = new Intent(TwitterLoginActivity.this, TweetsListActivity.class); intent.putExtra("tweetsdata",tweetsData); startActivity(intent); finish(); } </code></pre> <p>Also be aware that on your code in lines 127-128 these lines are switched:</p> <pre><code> startActivity(intent); intent.putExtra("tweetsdata",tweetsData); </code></pre> <p>After start activity there is no sense to change the intent.</p> <p><strong>EDIT:</strong></p> <p>Also noticed this code after startActivity() for the web login, which don't make any sense:</p> <pre><code>TwitterLoginActivity.this.runOnUiThread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub Intent intent = new Intent(TwitterLoginActivity.this, TweetsListActivity.class); intent.putExtra("tweetsdata",tweetsData); startActivity(intent); finish(); } }); </code></pre> <p>Remove this code.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload