I am trying to create a register activity to allow a user to register however I keep getting the error: Cannot resolve method ‘setTimestampsInSnapshotsEnabled’ in ‘Builder'” It’s only the section which has the setTimestampsInSnapshotsEnabled that is giving me the issue. Do I need an implementation? Here is my Java code: Answer If I look at the current documentation for FirebaseFirestoreSettings.Builder,
Tag: firebase
I am getting error in firebase database function get()
I am facing a problem for 2-3 days I am trying to fix it but I can’t fix it. I am continuously getting errors on a Firebase Realtime Database function get() on a code that I have copied from Firebase Realtime Database documentation. Here is my code: Build.gradle: I am getting error on compiling code that is: The method get()
I want to get all child of child items one by one in firebase database
here is model class : I want that I get all food items from all categories one by one and than show every single food item data in recycler view and after getting list of all items I want that I add only those items in a list which pin value is TRUE here is the java class file code
Why is Firebase realtime database is repeatedly changing data?
I’m using the below code for inserting data to the Firebase real-time database: Answer If you only want to write the user to the database, there is no need to attach a ValueEventListener. You can only use: There is no need to read anything, or listen for real-time updates, when writing data, unless you need to do some verifications, for
App crash with GC When an object added to firebase – Android Studio
Hello I have an Android app when an update ( Insert new data in firebase or update an attribute ) is done in firebase the app will crash for 15-30 sec. when I checked the log, it show that’s in that time the GC is working and it takes a lot of time to do his work so the app
why my items are not showing in wishlist in android studio
I am working on an application where I want to add items in the wishlist section. I have some data which I am fetching from the firestore in recyclerview on each item I have a heart icon when someone clicks on that icon that particular item should be added to the wishlist section. I am new to android please guide
App crashes when I press “continue” button (transitioning between activities)
I am creating an app where you log in and then access a database of files unique to each user account. I have a continue button linking the “LoginActivity” and “MainActivity” activities together. The code that I have in the LoginActivity file is this: and on the MainActivity side I have this: What is wrong with my code? I can’t
ConcurrentModificationException thrown on for
problem of cant add element while iterating. i tried th emethod of creating another arraylist nd store element there and add them all in one time but it didnt work because you nedd the arraymist size to operate right. any help pls. Answer You’re doing the following: Obtain an iterator from some collection object. a for (var foo : collectionObject)
Retrieve count data from Firebase Java
I am trying to count the number of children in my DB table that meet a certain condition. If the isSeen column equals false then I want to count that, if it equals true I don’t want to count it. Currently, it’s not working but if I change the query from Query query = usersRef.orderByChild(“isSeen”).equalTo(true); to Query query = usersRef.orderByChild(“isSeen”);
How to make auto refreshing on recyclerview Android while getting data from firebase firestore
I added a swipe SwipeRefreshLayout but the data only show when I swipe down to refresh. If I don’t refresh the data didn’t show. I want an auto refresh on the background when an activity is created. This is my XML After getting data from the firebase I added it to the list and add that list into the adapter.