@@ -43,18 +43,18 @@ Gradle, add:
43
43
44
44
``` groovy
45
45
dependencies {
46
- // ...
47
- compile 'com.firebaseui:firebase-ui-auth:0.6.0'
46
+ // ...
47
+ compile 'com.firebaseui:firebase-ui-auth:0.6.0'
48
48
}
49
49
```
50
50
51
51
If instead your project uses Maven, add:
52
52
53
53
``` xml
54
54
<dependency >
55
- <groupId >com.firebaseui</groupId >
56
- <artifactId >firebase-ui-auth</artifactId >
57
- <version >0.6.0</version >
55
+ <groupId >com.firebaseui</groupId >
56
+ <artifactId >firebase-ui-auth</artifactId >
57
+ <version >0.6.0</version >
58
58
</dependency >
59
59
```
60
60
@@ -72,8 +72,8 @@ the [Facebook developer dashboard](https://developers.facebook.com):
72
72
73
73
``` xml
74
74
<resources >
75
- <!-- ... -->
76
- <string name =" facebook_application_id" translatable =" false" >APPID</string >
75
+ <!-- ... -->
76
+ <string name =" facebook_application_id" translatable =" false" >APPID</string >
77
77
</resources >
78
78
```
79
79
@@ -86,9 +86,9 @@ whether a
86
86
``` java
87
87
FirebaseAuth auth = FirebaseAuth . getInstance();
88
88
if (auth. getCurrentUser() != null ) {
89
- // already signed in
89
+ // already signed in
90
90
} else {
91
- // not signed in
91
+ // not signed in
92
92
}
93
93
```
94
94
@@ -196,18 +196,18 @@ supported.
196
196
197
197
``` java
198
198
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
199
- super . onActivityResult(requestCode, resultCode, data);
200
- if (requestCode == RC_SIGN_IN ) {
201
- if (resultCode == RESULT_OK ) {
202
- // user is signed in!
203
- startActivity(new Intent (this , WelcomeBackActivity . class));
204
- finish();
205
- } else {
206
- // user is not signed in. Maybe just wait for the user to press
207
- // "sign in" again, or show a message
208
- }
209
- }
210
- }
199
+ super . onActivityResult(requestCode, resultCode, data);
200
+ if (requestCode == RC_SIGN_IN ) {
201
+ if (resultCode == RESULT_OK ) {
202
+ // user is signed in!
203
+ startActivity(new Intent (this , WelcomeBackActivity . class));
204
+ finish();
205
+ } else {
206
+ // user is not signed in. Maybe just wait for the user to press
207
+ // "sign in" again, or show a message
208
+ }
209
+ }
210
+ }
211
211
```
212
212
213
213
Alternatively, you can register a listener for authentication state changes;
@@ -236,17 +236,17 @@ completed once all necessary sign-out operations are completed:
236
236
237
237
``` java
238
238
public void onClick(View v) {
239
- if (v. getId() == R . id. sign_out) {
240
- AuthUI . getInstance()
241
- .signOut(this )
242
- .addOnCompleteListener(new OnCompleteListener<Void > () {
239
+ if (v. getId() == R . id. sign_out) {
240
+ AuthUI . getInstance()
241
+ .signOut(this )
242
+ .addOnCompleteListener(new OnCompleteListener<Void > () {
243
243
public void onComplete (@NonNull Task<Void > task ) {
244
- // user is now signed out
245
- startActivity(new Intent (MyActivity . this , SignInActivity . class));
246
- finish();
244
+ // user is now signed out
245
+ startActivity(new Intent (MyActivity . this , SignInActivity . class));
246
+ finish();
247
247
}
248
- });
249
- }
248
+ });
249
+ }
250
250
}
251
251
```
252
252
@@ -308,8 +308,8 @@ redefine a string to change it, for example:
308
308
309
309
``` java
310
310
< resources>
311
- < ! -- was " Signing up..." -- >
312
- < string name= " progress_dialog_signing_up" > Creating your shiny new account...</string>
311
+ < ! -- was " Signing up..." -- >
312
+ < string name= " progress_dialog_signing_up" > Creating your shiny new account...</string>
313
313
</resources>
314
314
```
315
315
0 commit comments