You are on page 1of 22

Xy dng ng dng

chat
vi Firebase
GDG Ha Noi Group

NanoChat

Ni dung chnh
1. To app https://firebase.com

2. To project
3. Kt ni ti Firebase.

4. Gi tin nhn
5. Hin th tin nhn

6. Login
7. M rng
Read more at: https://goo.gl/dZpnrc

Yu cu
1. C ti khon trn https://firebase.com

2. Android Studio
3. Thit b Android
4. Ti code: https://goo.gl/5xO5Rt

1. To app

2. To project
1. Application Name: NanoChat
2. Company Domain: firebase.gdg.com
3. Project Location: Desktop/
4. Minimum SDK: 16 (Jelly Bean)
5. Template: Empty Activity

6. Activity Name: MainActivity


7. LayoutName: activity_main

2. To project

3. Kt ni ti Firebase
1.Thm th vin Firebase
2.Sync poject

3. Kt ni ti Firebase
Thm INTERNET permission

To Firebase context
Kt ni ti: https://codelabg.firebaseio.com

4. Gi tin nhn

4. Gi tin nhn
Thng tin gi:
name: "Android User
text: ni dung c nhp

5. Hin th tin nhn


Class d liu ChatMessage

name

text

5. Hin th tin nhn


ListView hin tin nhn

5. Hin th tin nhn


S dng FirebaseListAdapter hin tin nhn

5. Hin th tin nhn


ng kt ni khi thot ng dng

6. Login
Bt tnh nng login bng email-password

6. Login

6. Login
S dng FirebaseLoginBaseActivity

Vit phng thc: getFirebaseRef()

6. Login
Khai bo kiu login: PASSWORD

Nhn Login -> M dialog

6. Login
Hin thng tin user:

7. M rng
1. Chc nng Logout
2. Login bng Facebook
3. S dng RecyclerView

Ti code ti https://goo.gl/5xO5Rt

Contact me:

Khac pham
khacpv@gmail.com
Linkedin.com/in/khacpham

You might also like