You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codelabs/chat/README.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,7 @@ Now that we can send messages to Firebase, it is time for the next step: making
232
232
233
233
A chat app that doesn’t show existing messages is not very useful. So in this step we’ll add a list of the existing messages to our Android app. And since we're using Firebase, new chat messages will be added to this list automatically. At the end of this section we’ll have a fully functional chat app.
234
234
235
-

235
+
<imgalt="Chat messages Android app and new message"src="images/5_1.png"height="600">
236
236
237
237
Let's take this in chunks: first we'll create a Java class to represent each message, then we'll create an Adapter that gets each of the messages from Firebase and puts them into a ListView.
238
238
@@ -369,11 +369,7 @@ First add a button to the top right of activity_main.xml
369
369
370
370

371
371
372
-
Extend FirebaseLoginBaseActivity
373
-
374
-
Although extending `ListActivity` was useful earlier, when it saved some lines of code, it's now more important that we extend `FirebaseLoginBaseActivity`.
375
-
376
-
We'll change our `MainActivity` definition to extend `FirebaseLoginBaseActivity`.
372
+
We'll change our `MainActivity` definition to extend `FirebaseLoginBaseActivity`. This allows us to make use of FirebaseUIs headful auth in the easiest way.
377
373
378
374
```java
379
375
public class MainActivity extends FirebaseLoginBaseActivity {
Then we can enable an auth provider. In this example we'll just use `PASSWORD` but social providers can be enabled here, too.
422
418
423
419
```java
424
420
@Override
@@ -430,7 +426,7 @@ protected void onStart() {
430
426
431
427

432
428
433
-
Wireup login button
429
+
We want our users to be able to click a button to be prompted to log in, so we'll wire up the button we added a moment ago to call `showFirebaseLoginPrompt()`.
@@ -451,6 +447,10 @@ Now go into your Firebase Dashboard and go to the Auth tab and select "Email/Pas
451
447
452
448
This is also where you can configure the password reset emails that you can send to your users, in case they forgot their password.
453
449
450
+
Now run your app and click the Login button and you'll see the FirebaseUI dialog. When a user logs in the event handlers we added on our activity will be called and you can interact with their authentication data however you want.
0 commit comments