I am making an android app where anyone can read the data but only an authentic user (whom we added in Realtime database as ‘User’ with email id) can modify or add. I want that no one other than authentic user can write in his /her database. Others can only read. Here is my database structure:- Answer Your rule might
Tag: firebase-realtime-database
Data retrieve on Data Change in firebase getting Error
I am making an android app based on firebase. My logcat showing error on data change. Here is the code: Can anybody improve it? Here is my logcat error message: It is showing error on this line. “at my_project_name.SheetActivity$3.onDataChange(SheetActivity.java:156)” I have tried a lot. Sometimes it worked but stopped again. I cannot point out where is the mistake. my model
com.google.firebase.database.Query cannot be cast to com.google.firebase.database.DatabaseReference
Hi I’m implementing a simple search where it will filter based on if the text is the same as the record in the database but I’m having this error could someone help me? Using equalsTo I can’t open the fragment it just breaks when trying to open the fragment, what am I doing wrong? Any help is welcome. Thanks in
dataSnapshot could not get parent push key value
I want dataSnapshot to check if “month” exists in its parent’s “summary”. But dataSnapshot is returning that it does not have “month” in “summary” My Firebase Database: I want to check the value (blue line) from its parent(red line) My Firebase Database Answer The following line of code: Returns the key of the node on which the reference is pointing
How to save last visited url in android webview? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question So im writing a very simple web-view app that shows certain types of users a web-page that I get from Firebase Realtime Database. Everything works
How to update only changed item with MutableLiveData in Android?
I have nested fragments with ViewPager2 and Tabs, and I’m loading data into RecyclerView with MutableLiveData. Everything works fine till I update something on my Firebase Realtime Database (eg. name of some food item). So if I have 10 category items with each having 5 food items, and I update name of 1 food, my screen flickers and 10 new
Is there a way in firebase android to fetch data within a range?
I have a database in firebase realtime database.My DB look like this : I want to fetch data within a date range. That is if user select 03-09-2020 as start date and 05-09-2020 as end date,what i want is to display all values of TotalTax field (in this case 3 values 500,500 and 100). How can i achieve this? Hope
save unique key firebase to child
I have a database like this I want to save a unique key “-MCzU6r-JqvAkC9unjru” in my child, like this can I do that? if can how I can implement it in my code? here code for add data to firebase Answer You can do the following: Using getKey() you can retrieve the random id created using push() and then add
Arraylist error index out of bound or it is null
As we know there is no multi query option to firebase realtime database, so instead of using default FirebaseRecycler methods I am trying to manually feed keys from arraylist to the recycler view. In order to sort specific keys on the basis specific child nodes of the given parent I wrote below logic. If I try to individually log the
How to make addListenerForSingleValueEvent to work in loop?
I’m trying to access the addListenerForSingleValueEvent for a specific number of times based on the amount of item’s present in cart but since it listen’s for only one time I’m unable to fetch the …