Back to project page AndroidTwitterApp.
The source code is released under:
MIT License
If you think the Android project AndroidTwitterApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.julienlecomte.apps.basictwitter; //w w w . j a v a 2 s . c om import android.content.Intent; import android.os.Bundle; import android.view.View; import com.codepath.oauth.OAuthLoginActivity; public class LoginActivity extends OAuthLoginActivity<TwitterClient> { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); } // OAuth authenticated successfully, launch primary authenticated activity // i.e Display application "home page" @Override public void onLoginSuccess() { Intent i = new Intent(this, TimelineActivity.class); startActivity(i); } // OAuth authentication flow failed, handle the error // i.e Display an error dialog or toast @Override public void onLoginFailure(Exception e) { e.printStackTrace(); } // Click handler method for the button used to start OAuth flow // Uses the client to initiate OAuth authorization // This should be tied to a button used to login public void loginToRest(View view) { getClient().connect(); } }