How To Structure Push Token For Multiple Apps In A Single Firebase Database
Suppose I have 3 Apps sharing the same single Firebase database, and all Apps have Android/iOS version. How could I structure the JSON hierarchy in Firebase Database? The following image is my current push token JSON structures. Any better suggestion for pushing only one specified App, and other two Apps receive nothing? Thanks!
For you scenario, I would probably just go ahead with storing the other tokens under the same (user) node. So just edit what you already have to something like this:
/pushTokens /$userId /appId1:token1 /appId2:token2 /appId3:token3
I don't know why you still need the
userId node inside the actual node that uses it as a key though.
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?