android-firebase-chat icon indicating copy to clipboard operation
android-firebase-chat copied to clipboard

Get all friends dialog box

Open henivalking opened this issue 7 years ago • 2 comments

Stuck at Get all friends dialog box at that point the box is keep loading and nothing was happen

henivalking avatar Nov 25 '17 06:11 henivalking

Hi @henivalking Maybe cause of your stuck is issue #28

hieuapp avatar Nov 26 '17 15:11 hieuapp

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!

shubh261096 avatar Mar 09 '19 19:03 shubh261096