firebaseui

“This app is not authorized to use Firebase Authentication” in Emulator

*爱你&永不变心* 提交于 2019-11-27 05:51:30
问题 I'm getting this error when I try to run my app on emulator. What I've done: I'm using Firebase-UI and running Android O I have the Play Store updated. I've added all the SHA-1 code to Firebase console and the package name matches. In fact when I run the app on a real device it runs perfectly and I can login. This app is not authorized to use Firebase Authentication. Please verify that the correct package name and SHA-1 are configured in the Firebase Console. com.google.firebase.auth

How to update a FirebaseRecyclerAdapter's query

心不动则不痛 提交于 2019-11-27 04:48:35
问题 If I have a Query a , and I'm setting it to a FirebaseRecyclerAdapter . Then, I want to constantly create a new Query and update the FirebaseRecyclerAdapter . E.G: query = database.orderByChild("child"); query2 = database.orderByChild("child2"); adapter = new FirebaseRecyclerAdapter<...>(...,...,...,query){ ... } Now, after 3 seconds, I'm looking for a method to change the query. Similar to this: adapter.setQuery(query2); Is there an existing method for this? Or was Firebase, like always, too

Google sign-in Android with Firebase - statusCode DEVELOPER_ERROR

一世执手 提交于 2019-11-27 02:36:38
问题 I try to implement Google login in my Firebase connected Android app. When I run the app and press Google Sign In button - nothing happen. And I receive this error in onActivityResult: Status{statusCode=DEVELOPER_ERROR, resolution=null} . My code looks like this: protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_GOOGLE_LOGIN) { GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data); if (result.isSuccess())

I can't find populateViewHolder Method in FirebaseRecyclerAdapter class

╄→尐↘猪︶ㄣ 提交于 2019-11-26 22:55:56
I want to use FirebaseRecyclerAdapter in my project and I used this code segment in a previous Project FirebaseRecyclerAdapter<ChatMessage, ChatMessageViewHolder> adapter = new FirebaseRecyclerAdapter<ChatMessage, ChatMessageViewHolder>(ChatMessage.class, android.R.layout.two_line_list_item, ChatMessageViewHolder.class, ref) { public void populateViewHolder(ChatMessageViewHolder chatMessageViewHolder, ChatMessage chatMessage, int position) { chatMessageViewHolder.nameText.setText(chatMessage.getName()); chatMessageViewHolder.messageText.setText(chatMessage.getMessage()); } }; recycler

FirebaseRecyclerAdapter doesn't recognize first layout as a position

自闭症网瘾萝莉.ら 提交于 2019-11-26 22:05:09
问题 My Title is kind of hard to understand but basically when I add items into my database is should display it in a RecyclerView . Now in my RecyclerView I have two layouts but the problem is the first item of my database goes behind my first item in my other layout. So if I have 3 items in my database, it shows only 2 items from the database and the first item hides behind my first item in the RecyclerView which is a different layout that does not use the database at all. This is my code:

How to dismiss a progress bar even if there is no view to populate in the FirebaseListAdapter?

非 Y 不嫁゛ 提交于 2019-11-26 20:57:30
I use the FirebaseUI FirebaseListAdapter. It takes some time to load the data and I want to show a spinning circle. I can dismiss the progress bar in by setting the view visibility to invisible in the populateView, but it doesn't work if there is no view to populate. How to handle this? Update : the FirebaseUI adapters nowadays have an onDataChanged() method that you can override to detect when they're done loading a set of data. See the source code on github . From there: This method will be triggered each time updates from the database have been completely processed. So the first time this

How to hide an item from Recycler View on a particular condition?

本秂侑毒 提交于 2019-11-26 20:45:19
I am using Firebase Recycler Adapter (Firebase UI Library) to populate Recycler View. I want to hide an item(row) on a condition. I have a LinearLayout containing a recycler view. I set linear layout visibility to Gone in populateViewHolder() method of recycler view adapter. @Override protected void populateViewHolder(UsersViewHolder viewHolder, User user, int position) { if (user.getUserEmail().equals(Utils.decodeEmail(userEmail))) { viewHolder.llMain.setVisibility(View.GONE); return; } viewHolder.tvUserEmail.setText(user.getUserEmail()); } It hides the LinearLayout but the row remains there

how to implement a SetOnItemClickListener FirebaseRecyclerViewAdapter

泄露秘密 提交于 2019-11-26 20:31:51
how to implement a SetOnItemClickListener event in a Firebase RecyclerView Adapter? I use the example of documentation, chat app: private FirebaseRecyclerViewAdapter mAdapter; RecyclerView recycler = (RecyclerView) findViewById(R.id.messages_recycler); recycler.setHasFixedSize(true); recycler.setLayoutManager(new LinearLayoutManager(this)); mAdapter = new FirebaseRecyclerViewAdapter<ChatMessage, ChatMessageViewHolder>(ChatMessage.class, android.R.layout.two_line_list_item, ChatMessageViewHolder.class, mRef) { @Override public void populateViewHolder(ChatMessageViewHolder chatMessageViewHolder,

Unexpected Behavior When Query by .whereArrayContains()

我们两清 提交于 2019-11-26 18:41:26
问题 I have a RecyclerView that utilizes the FireaseUI and orders all objects from the "Polls" node by the "timestamp" field (sequentially). New Fragment - .onViewCreated() Query queryStore = FirebaseFirestore.getInstance() .collection(POLLS_LABEL) .orderBy("timestamp", Query.Direction.ASCENDING); //Cloud Firestore does not have any ordering; must implement a timestampe to order sequentially FirestoreRecyclerOptions<Poll> storeOptions = new FirestoreRecyclerOptions.Builder<Poll>() .setQuery

How to get obj key from FirebaseListAdapter on Item Click. FirebaseUI

房东的猫 提交于 2019-11-26 14:19:24
问题 When subclassing FirebaseListAdapter in FirebaseUI how can one get the obj key of the item clicked? FirebaseListAdapter has the following method which gets itemId, but returns long. But I require the object key which is in the default string format. public long getItemId(int i) { return (long)this.mSnapshots.getItem(i).getKey().hashCode(); } 回答1: The FirebaseListAdapter assumes that you always know the index/position of the item you are interacting with. Given the Android context this makes