firebase-realtime-database

Creating class for Firebase DataStructure in Swift

断了今生、忘了曾经 提交于 2020-01-01 06:14:07
问题 I am new to firebase, a Firebase structure was created for me to work on, what i want to do basically is to list all users the FirebaseDB. I want to create a corresponding class in swift to the firebase data structure below. "users" : { "A654tdC5uBPoKQzJnpZIpwOfsaJ3" : { "groups" : { "-KZ7fl3I4W7YWuGk6l9k" : true, "-KclzmvvJF54cAg14P92" : true, "-KclzpzrJOhCOWL5_jvw" : true, "-Kcm33N1B_oiVYrQWh3n" : true, "-Kcm3GfRaaGfztEBmflp" : true }, "location" : { "coordinates" : [ 6.59086, 3.3914267 ],

Use Firebase DB with local DB

徘徊边缘 提交于 2020-01-01 05:17:40
问题 In my app I have SQLite db . I want to introduce sync between devices of my users. Firebase DB looks like an acceptable solution, but Firebase DB is cloud db at first. So, I can't use it as local db if user will reject auth dialog and let him use app, but without cloud-sync. Now I think about combining my local SQLite db with cloud Firebase db . For example, when user adds new row to local SQLite db , my app will also put data into Firebase DB . Other devices of this user will catch this

How to set a custom ID when pushing a new object into Firebase

↘锁芯ラ 提交于 2020-01-01 04:31:06
问题 I am using Firebase with AngularJS in my application. When a user logs into the app with the Facebook authentication I want to create a new user object (with some properties coming from Facebook and some relative to my app) and store it in Firebase. It's simple, I'm pushing the new User object: ... var travelBidsFirebaseRef = new Firebase(url); var newUserRef = travelBidsFirebaseRef.child("user").push(user, callback); ... push() generates a unique ID, smth. like: -J08SgyOeOU_fFb1CB3G. So the

I want to list all unique childrens and keys along with values in a spinner firebase [closed]

送分小仙女□ 提交于 2020-01-01 03:42:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 days ago . I have my realtime database as this. Users=>UID=>Medicines=>Date=>Medicine Name :Values I have a spinner ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, arrayList); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item); spinner

How to retrieve data from Firebase to pass into an array in angularfire2/version-5

一个人想着一个人 提交于 2020-01-01 03:41:13
问题 I have some simple entries in Firebase like: All I want is, to get these values (each percentage) and pass them into an array called labels . so that I can use that array in my code. That is my question. Now, to me, it seemed easy but apparently it is not. First of all what I faced is @angularfire version 5 differences in the examples(but easy to understand in their GitHub docs). so secondly, I try to get data with: this.items = db.list('/percentage').valueChanges(); so I do it and check it

Can I use Firebase Cloud Functions for search engine?

喜夏-厌秋 提交于 2020-01-01 03:20:11
问题 Firebase recently released integration to Cloud Functions that allows us to upload Javascript functions to run without needing our own servers. Is it possible to build a search engine using those functions? My idea is to use local disk (tmpfs volume) to keep indexed data in memory and for each write event I would index the new data. Does tmpfs keeps data between function calls (instances)? Can cloud functions be used for this purpose or should I use a dedicated server for indexing data?

Firebase Swift 3 Xcode 8 - iterate through observe results

 ̄綄美尐妖づ 提交于 2020-01-01 02:52:30
问题 I have looked through the docs on Firebase and through Stack Overflow and YouTube tutorials, but I can find out how to get at the data if fetch through Firebase. I am new to Firebase and an in the process of switching my project from Parse to Firebase. Example: I have a data in Firebase that looks like this: I can grab all of the topics in Swift doing this: let refDB = FIRDatabase.database().reference(fromURL: firebaseDB_URL) let topicsRef = refDB.child("topics") // FIRDataSnapshot. topicsRef

Pagination using AngularFire2

雨燕双飞 提交于 2020-01-01 00:52:12
问题 I am building an Ionic2 project, that uses Firebase and I am using AngularFire2. From AngularFire2 documentation, I was able to get things like: const queryObservable = af.database.list('/items', { query: { orderByChild: 'size', equalTo: subject } }); This works well. I have around 300-400 records, but I can't pull it all in one API call. So I am trying to implement pagination. I tried many things. What I want to implement is this: StartAt(), endAt() I tried to pass it through the query

Android local SQLite sync with Firebase

瘦欲@ 提交于 2019-12-31 12:42:02
问题 I have an app where the default option is to store user data as a local SQLite database , however, I want to add the option if the user wants to sign in and transfer the local database to an online database so it can be accessed on multiple devices. I don't have much experience with cloud storage solution so any advice would be really appreciated. Is for my application the Firebase Real-time Database the best online solution or is there another approach I should look into? 回答1: Firebase's

Android local SQLite sync with Firebase

倖福魔咒の 提交于 2019-12-31 12:42:01
问题 I have an app where the default option is to store user data as a local SQLite database , however, I want to add the option if the user wants to sign in and transfer the local database to an online database so it can be accessed on multiple devices. I don't have much experience with cloud storage solution so any advice would be really appreciated. Is for my application the Firebase Real-time Database the best online solution or is there another approach I should look into? 回答1: Firebase's