Skip to content

Commit 4fddaa2

Browse files
committed
Put import before use of the imported code
1 parent 455fd72 commit 4fddaa2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

codelabs/chat/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,16 @@ Before we can start writing code that interacts with our Firebase database, we'l
120120

121121
![INTERNET permission in AndroidManifest.xml](images/3_3.png)
122122

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.
124128
open `MainActivity.java` and add this code to the end of the `onCreate` method:
125129

126130
Firebase.setAndroidContext(this);
127131

128132
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-
133133
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.
134134
11. We also want to create a connection to our database. We'll keep this connection in a member field:
135135

0 commit comments

Comments
 (0)