All Questions

23
votes
2answers
9357 views

How do you prevent duplicate user properties in Firebase?

I'm Using FirebaseSimpleLogin to create users and handle authentication. When I try and create a new user with simple login via the $createUser() method, firebase won't create the user if the email a...
22
votes
2answers
2779 views

How to write denormalized data in Firebase

I've read the Firebase docs on Stucturing Data. Data storage is cheap, but the user's time is not. We should optimize for get operations, and write in multiple places. So then I might store a list ...
11
votes
3answers
3652 views

Best way to manage Chat channels in Firebase

In my main page I have a list of users and i'd like to choose and open a channel to chat with one of them. I am thinking if use the id is the best way and control an access of a channel like USERID1-...
16
votes
1answers
3071 views

Asynchronous access to an array in Firebase

Here is my code: var userRef = new Firebase("https://awesome.firebaseio.com/users/"); var tokenRef = userRef.child(key+'/tokens'); tokenRef.once('value', function(snapshot){ var userTokenSync = $...
43
votes
3answers
8435 views

Firebase Offline Capabilities and addListenerForSingleValueEvent

Whenever I use addListenerForSingleValueEvent with setPersistenceEnabled(true), I only manage to get a local offline copy of DataSnapshot and NOT the updated DataSnapshot from the server. However, if...
63
votes
14answers
67799 views

Getting Exception java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase

I have updated my application to the new firebase using the this and now when i compile my project i get the following exception. Here is my logcat: 11:57:54.533 27844-27844/com.example.dayshift_2.t...
14
votes
1answers
13017 views

Firebase Query Double Nested

Given the data structure below in firebase, i want to run a query to retrieve the blog 'efg'. I don't know the user id at this point. {Users : "1234567": { name: 'Bob', blog...
45
votes
3answers
26186 views

How do I return a list of users if I use the Firebase simple username & password authentication

Not sure if I am doing something wrong but using this api https://www.firebase.com/docs/security/simple-login-email-password.html I can successfully create a user - according to the return message, bu...
46
votes
12answers
38801 views

How to send device to device messages using Firebase Cloud Messaging?

After searching the docs I could not find any info on how to send device to device messages using FCM without the use of an external server. For example, if I was creating a chat application I would ...
30
votes
15answers
42960 views

Display posts in descending posted order

I'm trying to test out Firebase to allow users to post comments using push. I want to display the data I retrieve with the following; fbl.child('sell').limit(20).on("value", function(fbdata) { // ...

Previous Next