Skip to content

Commit 96e3735

Browse files
committed
Clarify README.md file.
It was confusing that this class needs to trigger the connect() method in order to initiate the authentication.
1 parent 7073555 commit 96e3735

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You first need to make sure to download the prerequisites for using this library
1616
* [codepath-utils.jar](https://www.dropbox.com/s/u8ixvp4lw9fh8l5/codepath-utils.jar)
1717
* [android-async-http-client.jar](https://www.dropbox.com/s/fr9e3mk193q605q/android-async-http-1.4.3.jar)
1818

19-
Next download the [codepath-oauth.jar](https://www.dropbox.com/s/hgeq6f1rs43tnlb/codepath-oauth-0.2.2.jar) file.
19+
Next download the [codepath-oauth.jar](https://www.dropbox.com/s/hgeq6f1rs43tnlb/codepath-oauth-0.2.2.jar) file.
2020
Move all of these jars into the "libs" folder of the desired Android project.
2121

2222
If you want an easier way to get setup with this library, try downloading the
@@ -87,6 +87,13 @@ The next step to add support for authenticating with a service is to create a `L
8787
public class LoginActivity extends OAuthLoginActivity<FlickrClient> {
8888
// This fires once the user is authenticated, or fires immediately
8989
// if the user is already authenticated.
90+
91+
@Override
92+
protected void onCreate(Bundle savedInstanceState) {
93+
super.onCreate(savedInstanceState);
94+
setContentView(R.layout.activity_login);
95+
}
96+
9097
@Override
9198
public void onLoginSuccess() {
9299
Intent i = new Intent(this, PhotosActivity.class);
@@ -113,7 +120,7 @@ A few notes for your `LoginActivity`:
113120
* Your activity must extend from `OAuthLoginActivity<SomeRestClient>`
114121
* Your activity must implement `onLoginSuccess` and `onLoginFailure`
115122
* The `onLoginSuccess` should launch an "authenticated" activity.
116-
* The activity should have a button or other view a user can press to trigger authentication.
123+
* The activity should have a button or other view a user can press to trigger authentication via the connect() method (i.e. activity_login).
117124

118125
In more advanced cases where you want to authenticate **multiple services from a single activity**, check out the related
119126
[guide for using OAuthLoginFragment](https://github.com/thecodepath/android-oauth-handler/wiki/Advanced-Usage-with-OAuthLoginFragments).

0 commit comments

Comments
 (0)