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
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -120,16 +120,16 @@ Before we can start writing code that interacts with our Firebase database, we'l
120
120
121
121

122
122
123
-
8. Now we can get to the Java code. The first step there is to set up initial connection between our code and its Firebase backend.
123
+
8. Import Firebase at the top of your MainActivity by adding the following line:
124
+
125
+
import com.firebase.client.Firebase;
126
+
127
+
9. Now we can get to the Java code. The first step there is to set up initial connection between our code and its Firebase backend.
124
128
open `MainActivity.java` and add this code to the end of the `onCreate` method:
125
129
126
130
Firebase.setAndroidContext(this);
127
131
128
132
This code allows the Firebase client to keep its context.
129
-
9. Import Firebase at the top of your MainActivity by adding the following line:
130
-
131
-
import com.firebase.client.Firebase;
132
-
133
133
10. If Android Studio is having trouble finding the Firebase class, be sure that you've added dependencies and have synchronized the build file with the project.
134
134
11. We also want to create a connection to our database. We'll keep this connection in a member field:
0 commit comments