firebaseui

Sorting Data in Firebase

萝らか妹 提交于 2019-12-05 17:01:40
I'm using Firebase listview at its shown below and its working like a charm but the problem is it displays the last pushed key in the child("Posts") at the end of my listview(lv) I want the last pushed key to be displayed above all or if i can sort it by date. query = ref.child("Posts").orderByKey(); FirebaseListAdapter<ChatRoomJ> adapter = new FirebaseListAdapter<ChatRoomJ>( ChatRoom.this, ChatRoomJ.class, R.layout.lvchatroom,query ) { @Override protected void populateView(View v, ChatRoomJ model, final int position) { final String date = model.getDate(); final String displayName = model

Disable account chooser FirebaseUI React

末鹿安然 提交于 2019-12-05 10:17:17
I'm struggling with something that looks like a piece of cake, but I still can't manage to find a solution. I'm implementing a firebase authentication process, with reactjs and firebaseUI web react . Everything is just fine, except the fact that when I try to login using email/password, it takes me to accountchooser , which is a behavior I don't want. I searched the docs, github issues etc... But All I found was adding the line below in the uiConfig object : credentialHelper: firebaseui.auth.CredentialHelper.NONE The problem is that react throws an error complaining about firebaseui not being

Firestore into recyclerview using FirebaseUI, no data displayed

强颜欢笑 提交于 2019-12-05 03:59:06
问题 I just got started with Firestore. So I tried fitting my data directly into a recyclerview, here's the code I used for reference. Here's my UserRecyclerView Fragment : public class UserRecyclerView extends Fragment{ private ArrayList<User> user; RecyclerView mRecyclerView; public UserRecyclerView(){} @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.recycler_view

Filter query to populate FirebaseRecyclerAdapter

安稳与你 提交于 2019-12-05 02:13:42
问题 This is still unclear how to populate FirebaseRecyclerAdapter with custom query. Define a reference. Here: DatabaseReference ref = mDatabase.getReference().child("users"); Send it to adapter initAdapter(ref); Define query and set listener. Is it right? mAdapter = new FirebaseRecyclerAdapter<User, UserHolder>(User.class, R.layout.user_row_layout, UserHolder.class, ref) { @Override protected void populateViewHolder(final UserHolder viewHolder, final User model, int position) { Query query = ref

FirebaseRecyclerAdapter and multiply item types on android

倾然丶 夕夏残阳落幕 提交于 2019-12-05 02:05:05
问题 I want to add 2 types:- with image without image in my recyclerview . I know that I need to override method from FirebaseRecyclerAdapter but I don't know how. Help me please with this. @Override public int getItemViewType(int position) { return mModelLayout; } abstract protected void populateViewHolder(VH viewHolder, T model, int position); So I want to get from T-model type of item via int (1 - with image, 2 - without) and change mModelLayout basing on this info. Can I just add if else

FirebaseUI Auth - Facebook Login error : Unsuccessful debug_token response from Facebook

天大地大妈咪最大 提交于 2019-12-05 02:02:15
I'm trying to integrate FirebaseUI Auth library. Google sign-in and Email sign-in are working fine but I have a problem setting up Facebook Login. This is my code: user = firebaseAuth.getCurrentUser(); if (user != null) { startMainActivity(); finish(); } else { startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setIsSmartLockEnabled(!BuildConfig.DEBUG) .setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build()))

How to set multiple layout in FirebaseRecyclerAdapter?

寵の児 提交于 2019-12-04 21:27:39
I just make a chat application with Firebase and using RecyclerView in XML and using FirebaseRecyclerAdapter in Android, but the problem is that when I send a message through EditText, the message is sent successfully and show to the right side that I set with Layout as you can see in code below but the problem is that when I close app and restart the message go to left side: mFirebaseRecyclerAdapter = new FirebaseRecyclerAdapter<MessageModel, MessageViewHolder>( MessageModel.class, R.layout.layout_message_sender, MessageViewHolder.class, mFirebaserefrence_messages) { @Override public int

DataSnapshot is missing a constructor with no arguments

我的未来我决定 提交于 2019-12-04 20:22:49
I am implementing Firebase Recyclerview UI in my application. I have implemented a recyclerview adapter and it shows me following exception. Following is my adapter code : FirebaseRecyclerAdapter<DataSnapshot, MyHolder> recyclerAdapter = new FirebaseRecyclerAdapter<DataSnapshot, MyHolder>( DataSnapshot.class, R.layout.row_slots, MyHolder.class, databaseReference.child("slots").child(uid).child(dayOfWeek).child("time") ) { @Override protected void populateViewHolder(MyHolder viewHolder, DataSnapshot model, int position) { System.out.println("Key : "+model.getKey()); } }; It is showing following

Firebase UI authentication with google fails with message (code:10 message:10)

守給你的承諾、 提交于 2019-12-04 19:38:55
I've made a chat app that uses Firebase's feature Real-time database . I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10 . I would like to note here that: I've added the SHA1 fingerprint. How can I solve this? *Not sure if this is helpful but I've followed step by step this tutorial You need three keys in order to make it work: The debug key. Informations here . The release key.

FirebaseUI Auth library: Google sign in fails with: W/AuthMethodPicker: Firebase login unsuccessful

时光总嘲笑我的痴心妄想 提交于 2019-12-04 14:52:23
Using the available online documentation and this video: https://www.youtube.com/watch?v=0ucjYG_JrEE , I'm trying to start apply the new UI Auth library. Mail sign in works great, the Google sign in not: it gives a warning and the UI keeps showing the "Loading..." dialog. final FirebaseAuth auth = FirebaseAuth.getInstance(); auth.addAuthStateListener(new FirebaseAuth.AuthStateListener() { @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { FirebaseUser usr = firebaseAuth.getCurrentUser(); if (usr != null){ Log.d( TAG, "User signed in correctly: " + usr ); auth