firebase-realtime-database

Sort array result with date key in firebase database

大兔子大兔子 提交于 2020-06-18 17:26:22
问题 I am fetching some records from firebase database in a RecyclerView. I am already fetching the data on the basis of a specific key-value. Now I want the data to be sorted for a date key whose format is MM-dd-yyyy. How can I sort it? My code to fetch it: FirebaseRecyclerAdapter<Eventsdata,Eventshistory.Game> adapter=new FirebaseRecyclerAdapter<Eventsdata,Eventshistory.Game>(Eventsdata.class ,R.layout.eventshistoryrow ,Eventshistory.Game.class ,reference.child("Events").orderByChild("uid")

Firebase child query coming up nil after deleting a key then adding it back

折月煮酒 提交于 2020-06-18 02:37:26
问题 I run the code below and using print statements the Database is saying the children are null But in the Database there is definitely something there: The only thing I can think of is I let a user delete a message (by deleting the -LoyeLv.. . key) but if they want to add it back they can. I keep a copy of the deleted key and just send it back to the database so that the message in still in sync. The only problem with that is even when I don't do it (as in my example) and I delete the message,

SSL peer not authenticated Exception for Firebase real time database

时光毁灭记忆、已成空白 提交于 2020-06-17 14:11:33
问题 We are trying to post some data to firebase real time database and for some reason some of the request im getting peer not authenticated and some of the request are working properly . There is no pattern but some random request are failing. Please note there is no server restart or any change . Randomly some request im getting SSL peer not authenticated error. Please help to resolve this issue. success request : 2018/04/05 18:16:25,150- FlowContext-161 INFO - serviceAccount done 2018/04/05 18

SSL peer not authenticated Exception for Firebase real time database

本小妞迷上赌 提交于 2020-06-17 14:10:18
问题 We are trying to post some data to firebase real time database and for some reason some of the request im getting peer not authenticated and some of the request are working properly . There is no pattern but some random request are failing. Please note there is no server restart or any change . Randomly some request im getting SSL peer not authenticated error. Please help to resolve this issue. success request : 2018/04/05 18:16:25,150- FlowContext-161 INFO - serviceAccount done 2018/04/05 18

What is the best way to store data from Firebase to SQLite or offline in flutter?

风流意气都作罢 提交于 2020-06-17 11:46:29
问题 In my app when user is offline, I want data to store in local db and then sync data with firebase. 回答1: Both FireStore and Realtime Database have offline persistence. Firestore : Firestore.instance.settings(persistenceEnabled: true) In the case of Firebase Realtime database, you don't need anything specific to set-up. Offline connectivity is automatic. So, the following line does the trick : databaseReference.child(dbKey).set(data); 来源: https://stackoverflow.com/questions/61315478/what-is-the

What is the best way to store data from Firebase to SQLite or offline in flutter?

▼魔方 西西 提交于 2020-06-17 11:45:25
问题 In my app when user is offline, I want data to store in local db and then sync data with firebase. 回答1: Both FireStore and Realtime Database have offline persistence. Firestore : Firestore.instance.settings(persistenceEnabled: true) In the case of Firebase Realtime database, you don't need anything specific to set-up. Offline connectivity is automatic. So, the following line does the trick : databaseReference.child(dbKey).set(data); 来源: https://stackoverflow.com/questions/61315478/what-is-the

DatabaseException: Can't convert object of type java.lang.String to type Models.OrderDetails

一世执手 提交于 2020-06-17 09:43:25
问题 This is my database structure. I am trying to fetch Order Details. Here is the code databaseReference = FirebaseDatabase.getInstance().getReference().child("Admin Order"). child(userID); databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { for (DataSnapshot childSnapshot: dataSnapshot.getChildren()){ for (DataSnapshot grandchild : childSnapshot.child("Order Details").getChildren()){ OrderDetails details =

DatabaseException: Can't convert object of type java.lang.String to type Models.OrderDetails

会有一股神秘感。 提交于 2020-06-17 09:42:14
问题 This is my database structure. I am trying to fetch Order Details. Here is the code databaseReference = FirebaseDatabase.getInstance().getReference().child("Admin Order"). child(userID); databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { for (DataSnapshot childSnapshot: dataSnapshot.getChildren()){ for (DataSnapshot grandchild : childSnapshot.child("Order Details").getChildren()){ OrderDetails details =

Cannot resolve Symbol id

拟墨画扇 提交于 2020-06-17 09:11:49
问题 I have a recylcerView calles "Notes", I'm trying to add an new recylerview called "Assignments" wich will be created inside the notes recylerview item. When I click on a recylerview item (notes) it send me to ClassworkActivity in wich the assignments' recyclerview will be added to it. So I want to add the assignment recyclerview as a child of the notes recyclerview. Here's what I tried : final AssignmentAdapter assignmentAdapter=new AssignmentAdapter(assignlist,this); recyclerView.setAdapter

Cannot resolve Symbol id

蹲街弑〆低调 提交于 2020-06-17 09:10:30
问题 I have a recylcerView calles "Notes", I'm trying to add an new recylerview called "Assignments" wich will be created inside the notes recylerview item. When I click on a recylerview item (notes) it send me to ClassworkActivity in wich the assignments' recyclerview will be added to it. So I want to add the assignment recyclerview as a child of the notes recyclerview. Here's what I tried : final AssignmentAdapter assignmentAdapter=new AssignmentAdapter(assignlist,this); recyclerView.setAdapter