android-firebase-chat
android-firebase-chat copied to clipboard
Get all friends dialog box
Stuck at Get all friends dialog box at that point the box is keep loading and nothing was happen
Hi @henivalking Maybe cause of your stuck is issue #28
Step 1. Goto UserProfileFragment.java file and in ValueEventListener
onDataChange()
method update this code:
//Lấy thông tin của user về và cập nhật lên giao diện
listConfig.clear();
myAccount = dataSnapshot.getValue(User.class);
if (myAccount != null) {
setupArrayListInfo(myAccount);
if (infoAdapter != null) {
infoAdapter.notifyDataSetChanged();
}
if (tvUserName != null) {
tvUserName.setText(myAccount.name);
}
setImageAvatar(context, myAccount.avata);
SharedPreferenceHelper preferenceHelper = SharedPreferenceHelper.getInstance(context);
preferenceHelper.saveUserInfo(myAccount);
}
Step 2.
a) Goto your firebase console -> Database -> Add a Realtime Database
b) Change rules from false
to true
Done!