firebaseui

'addListenerForSingleValueEvent' in populateViewHolder method of FirebaseRecyclerAdapter gets called whenever data changes under Firebase reference

半腔热情 提交于 2019-12-25 09:24:47
问题 I'm using FirebaseRecyclerAdapter in my app and trying to populate it by fetching some data inside it's populateViewHolder() method and then assigning values to different parameters. Here's my code: private void attachRecyclerViewAdapter() { Query lastFifty = aReference.child(requestID).limitToFirst(50); mRecyclerViewAdapter = new FirebaseRecyclerAdapter<AModelClass, AModelClass.ViewHolder>( AModelClass.class, R.layout.a_layout, AModelClass.ViewHolder.class, lastFifty) { @Override protected

I am trying to perform a search on names within my FirebaseRecyclerAdapter with the below code

浪子不回头ぞ 提交于 2019-12-25 08:47:31
问题 The problem that I am having is I can search based on numbers inside the name but any other text shows nothing. Basically if the name in the child is 1212 NW Drive, I can search on the 1212 part but not the text of the name. Here is my code for building the adapter based on the EditText. mSearchText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int

Getting 'Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference' even when the reference is not null

ⅰ亾dé卋堺 提交于 2019-12-25 08:28:51
问题 I'm using FirebaseUI in my app and FirebaseRecyclerAdapter to be more specific. I'm fetching data from my FirebaseDatabase reference using the method given here. Here's my code: private void attachRecyclerViewAdapter() { Query lastFifty = mDatabase.child(rID).limitToFirst(50); mRecyclerViewAdapter = new FirebaseRecyclerAdapter<AModelClass, AModelClass.ViewHolder>( AModelClass.class, R.layout.a_player_layout, APlayersModelClass.ViewHolder.class, lastFifty) { @Override protected void

NoSuchMethodException: <init> [class android.view.View] after generating signed apk

前提是你 提交于 2019-12-25 08:24:04
问题 I don't know why NoSuchMethodException is happening in the app. I am using firebase auth + database. I am populating data to recyclerview with FirebaseRecyclerAdapter .I am trying to solve this exception by following this answer but cannot make it possible yet. public class PostViewHolder extends RecyclerView.ViewHolder {...} If I use debug version of the app it works perfectly without crashing. But after creating Signed apk app crashed every time. I am using firebase crash reporting in which

Notifications with Firebase from web

有些话、适合烂在心里 提交于 2019-12-25 07:59:54
问题 I have been working on an Android application and my customer that will use it want to send notifications is there any way to send notifications from a Web UI other than firebase console? 回答1: There is currently no public API to send Firebase Notifications. The Firebase Console is the only place for that. We're considering adding an API, which you could then use to build your own web site for your customer. See How to send firebase notifications to audience via HTTP 来源: https://stackoverflow

firebaserecycleradapter sort/compare/reorder data before populate

五迷三道 提交于 2019-12-25 03:28:06
问题 In my firebase database I have a collection of lat and long for each uid. I use firebase recyler adapter data to list down my data to the recycler view. FirebaseRecyclerAdapter<Model, ViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Model, ViewHolder>(Model.class, R.layout.row, ViewHolder.class, mRef) { @Override protected void populateViewHolder(final ViewHolder viewHolder, final Model model, int position) { Double dist = distance( myPosition.latitude, myPosition.longitude,

How to implement Firebase Recycler Adapter in newer version of Android 3.1 and higher?

心不动则不痛 提交于 2019-12-25 01:48:12
问题 Basically, what I am trying to do is use a FirebaseRecyclerAdapter and populate the RecyclerView with my custom designed CardView . The code for newer versions has been changed and therefore, I tried implementing it but didn't work. This is the code I use to write a year ago, which worked fine and populated my RecyclerView : FirebaseRecyclerAdapter<DataClass,DataViewHolder> FBRA= new FirebaseRecyclerAdapter<DataClass, DataViewHolder>( DataClass, R.layout.myCardView, DataViewHolder.class,

Error in getting server timestamp in Firestore

流过昼夜 提交于 2019-12-24 11:19:22
问题 I'm trying to add a document in Cloud Firestore, but I need the server timestamp for adding the document. Documents are successfully added in the collection with the correct timestamp . I'm adding the document with an alert dialog. But when I'm returning to my activity app terminates with following errors: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException ........ E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util

How to open a new activity when an item is clicked in Firebase RecyclerView

岁酱吖の 提交于 2019-12-24 11:02:02
问题 I have used FirebaseRecyclerView from Firebase UI to show a list of data. Now when I click on one of the items, depending on the ID of the item in database, I want to open DetailActivity. How can I get Firebase generated ID(eg: -KRAVjAhr6A_spgJZEET) in populateViewHolder . Query queryRef = mDatabase.child("user-tickets").child(userId); FirebaseRecyclerAdapter<Ticket, TicketViewHolder> adapter = new FirebaseRecyclerAdapter<Ticket, TicketViewHolder>( Ticket.class, R.layout.item_ticket,

Suddenly unable to build android studio project error: cannot access zzbcc

一世执手 提交于 2019-12-24 08:36:02
问题 I am getting following error in my android studio project: Error:(77, 40) error: cannot access zzbcc class file for com.google.android.gms.internal.zzbcc not found Error:Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details. It appeared suddenly. The issue is in one of the file which uses firebase authentication. If I comment it then appears in another file which is using Map. Edit1: dependencies { compile fileTree(dir: 'libs