firebase-realtime-database

Create Note with Userid firebase android studio

▼魔方 西西 提交于 2020-01-16 19:31:12
问题 Hello guys in this application i use firebase as backend where i have created users with firebase auth. i want to Add the firebase Auth id in the note so i can retrive notes to that current logged in user. right now my notes gets added into database under (ToDo) however they get their own id and not the user id how can i fix this ? public class HomeActivity extends AppCompatActivity { private FirebaseAuth firebaseAuth; private Button logout; private GridLayoutManager gridLayoutManager;

Get data from firebase realtime between table to recycler view

血红的双手。 提交于 2020-01-16 17:26:06
问题 I am having problem reading data from Firebase. But, I just can get single data but, I need to get list of that data. Since it is my first work using Firebase. I have only used SQL in the past. Here is My Firebase Structure. "UserEO" : { "RZ5piQEWcoSonDYPu3NSKBrXTbW2" : { "-LdK1ZgjaKvXFjUeq-Yj" : { "keyUID" : "RZ5piQEWcoSonDYPu3NSKBrXTbW2" }, "-LdK264lPX9eBBzYe0m4" : { "keyUID" : "RZ5piQEWcoSonDYPu3NSKBrXTbW2" } } }, "eventOrganizer" : { "-LdK1ZgjaKvXFjUeq-Yj" : { "deskripsi" : "USMA is .. ",

Get firebase database of current uid returns undefined

▼魔方 西西 提交于 2020-01-16 09:39:28
问题 I have a page to a retrieve user's information, but I am getting undefined. Below is my data structure { "posts" : { "-L4QKxs6d06Vq3amQ7C8" : { "content" : "Test", "owner" : "D5hkgRIN87OUr3rdSGK1Znws1aB2", "title" : "Admin Post" }, "-L4UDg1_glHcqwGjGpTQ" : { "content" : "fsdfd", "owner" : "D5hkgRIN87OUr3rdSGK1Znws1aB2", "title" : "rewsrwr" } }, "users" : { "D5hkgRIN87OUr3rdSGK1Znws1aB2" : { "posts" : { "-L4QKxs6d06Vq3amQ7C8" : { "title" : "Admin post" }, "-L4UDg1_glHcqwGjGpTQ" : { "title" :

Firebase paging data. Is it possible?

↘锁芯ラ 提交于 2020-01-16 09:08:17
问题 I have a function which basically reads data from firebase. I am trying to implement paging. Please see what i tried. I have seen other posts on this website but they are not very clear. getFormData(pageSize:number,pageIndex:number,af:AngulrFireDatabase) { Try1: Returning all records ---------------------------- return this.af.list('/forms').skip(pageIndex*pageSize).take(pageSize); Try2: Not sure how to use the previous page last key value to pass to load the next page data. -----------------

Firebase Database: Out of Memory Exception on querying huge amount of data on Android app

浪尽此生 提交于 2020-01-16 09:05:35
问题 I'm using Firebase database for my Android app. I needed a unique 5-digit code which should be valid for 3 days. To resolve this I inserted all possible 5-digit codes in Firebase database where each entry initially has status as 1 . So structure looks something like this: codes: { 'abcde': {status:1}, 'zhghs': {status:1} ..... } This codes object has close to 5 million entries. I was thinking I would set status to 2 once a code is in use. I'm using this to get a code from Firebase: db

Firebase database load data into Listview

為{幸葍}努か 提交于 2020-01-16 09:03:09
问题 I have this DB structure: { "customers" : { "-L-OcgJ0kwTNSm6HoSvG" : { "address" : "Test Alamat", "birthday" : "1990-12-03", "email" : "Dodi@gmail.com", "name" : "Dodi", "outletID" : "2673", "phone" : "09888777111" } } } Now i want to load all data of "customers" into ListView using FirebaseUI-Android library. And here is the codes: Query query = FirebaseDatabase.getInstance().getReference().child("customers").limitToLast(50); FirebaseListOptions<Customers> options = new FirebaseListOptions

Getting Firebase DB values to HTML tables without repetition of older values

别说谁变了你拦得住时间么 提交于 2020-01-16 08:14:12
问题 I am trying to display my Firebase DB values to a HTML table. When I add the values, my front end table should automatically be updated without the need for a refresh. I am able to do that but it somehow also appends the most recent value at the top of the table. Don't know whats wrong Here is my HTML and JS embedded within: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Customer table</title> <script src="https://www.gstatic.com/firebasejs/4.2.0/firebase.js"></script> <script

Getting Firebase DB values to HTML tables without repetition of older values

强颜欢笑 提交于 2020-01-16 08:13:32
问题 I am trying to display my Firebase DB values to a HTML table. When I add the values, my front end table should automatically be updated without the need for a refresh. I am able to do that but it somehow also appends the most recent value at the top of the table. Don't know whats wrong Here is my HTML and JS embedded within: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Customer table</title> <script src="https://www.gstatic.com/firebasejs/4.2.0/firebase.js"></script> <script

Pushing JSON file to Firebase database Android

房东的猫 提交于 2020-01-16 04:57:13
问题 I'm experimenting with Google's new Firebase database service; and I was just wondering if it would be possible to push an entire JSON(Object?) to my database. Thanks, Josh 回答1: I parsed my JSONObject to a map using this and then saved to firebase using setValue(). 来源: https://stackoverflow.com/questions/38270153/pushing-json-file-to-firebase-database-android

Firebase Cloud Functions: Cannot pass the token retrieved from Realtime Database

戏子无情 提交于 2020-01-15 12:27:09
问题 I'm having issues in retrieving a token saved in realtime database using cloud function's admin.database(). There is only one token to read from the child. Firebase Database structure Here's my code in Index.js const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); exports.sendNotification = functions.database .ref('/Logs/{LogsID}') .onWrite( (change, context) => { const notificationSnapshot = change.after.val(); const status =