The data on Apple watch send to firebase - firebase

I want to send the acceleration data which is retrieved from Apple Watch to Cloud Storage for Firebase.
However, Firebase is not support watchOS.
Should I have sent the acceleration data to the storage via iPhone?
Please teach me a better method.

As a workaround you could send the data to the Firebase Realtime Database or Cloud Firestore using the REST Service. By implementing a Firebase node.js cloud function which triggers on Data Writes you could copy the data to Cloud Storage.
Anyway for your purpose it seems to be a better solution to work with the super fast Realtime Database instead of the slow storage.

Related

How to push new data from Realtime Database to Cloud Firestore?

I am pushing data to Firebase via Zapier and it lands in the Realtime Database. However, I am using Cloud Firestore. I've looked through a lot of documentation for both services but neither seems to have answers.. (there is information on migrating but I would like to keep both DBs).
How would I push each new or updated data entry from Realtime Database to Cloud Firestore?
There is nothing built into Firebase to automatically do this.
The fastest I can think of is to build a Cloud Function that listens for the Realtime Database writes, and then also sends them to Firestore.
Alternatively, doesn't Zapier allow you to have two zaps, one that writes to each database?

How to listen to changes in Firestore with ESP8266?

How do i listen to data changes in Firebase Cloud Firestore with ESP8266? So far i have managed to connect ESP8266 with firestore to read and post data to Firestore using the REST API, but instead of constantly reading data from Firestore, I want to listen to an event when the data changes in Firestore.
In short, I want to have a stream open where i am listening for changes in Firestore.
This can be done with Firebase Real-time database, but i haven't found examples for Firestore.
Here is an example of what i am trying to do, but with real-time database: https://github.com/mobizt/Firebase-ESP8266/blob/master/examples/Stream/Stream.ino
I was asking around on some forums, and i found out that sadly this is not possible :(
The Cloud Firestore supports the REST API unless stream like feature are not available due to poor performance and Firebase team decided to remove this feature.
The only possible method that suitable for no Firebase SDK installation is the RPC (gRPC) which is not currently available in embedded device.
The other problem is database secret can't use in the Cloud Firestore, the auth or custom token is required and need the SSL/TLS library for key encryption and signing. This can be done in ESP32 with mbed TLS which can't do this in ESP8266 with BearSSL.
Then Cloud Firestore with realtime feature (using gRPC) is not possible in ESP8266.
From a issue on github#Firebase-ESP8266: https://github.com/mobizt/Firebase-ESP8266/issues/126
The workaround can be using a webserver and/or Firebase Functions, which sadly was the thing I was trying to avoid.

Can I read data from realtime data base across cloud functions in react native

I want to read and write data in database real time across cloud functions but I don't know if this is possible, also I don't know if this is good practice or if is better make this through with SDK database realtime
I learning firebase and react native, I am new learning these topics.
From the docs:
Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Your code is stored in Google's cloud and runs in a managed environment. There's no need to manage and scale your own servers.
Cloud Functions runs Node v.6.11.5, so we recommend that you develop locally with this version.
You are able to use realtime database trigggers like onCreate(), onWrite(). Also you are able to use set() to send data to the realtime database.
https://firebase.google.com/docs/functions/
https://firebase.google.com/docs/functions/database-events

Structuring Firebase for a large string array [duplicate]

I learnt about real-time data storage and hosting storage from this post Difference between Data Storage and Hosting Storage?
But i am still not clear about real time Database and and newly introduced file storage.
Does anybody have some brief explanation about it ?
Thanks in advance .
(As per the concern about duplicated with Difference between Data Storage and Hosting Storage? what the problem solves and what i am asking are two different things and hosting storage and file storage are different in case of google firebase )
Firebase now offers these places to store your data:
Realtime Database
Remote Config
Hosting
Storage
Cloud Firestore
The best place to store your data, depends on the type of data you want to store and the way you want to consume it.
The Firebase documentation says this about it:
The Firebase Realtime Database stores JSON application data, like game state or chat messages, and synchronizes changes instantly across all connected devices.
Firebase Remote Config stores developer-specified key-value pairs to change the behavior and appearance of your app without requiring users to download an update.
Firebase Hosting hosts the HTML, CSS, and JavaScript for your website as well as other developer-provided assets like graphics, fonts, and icons.
Firebase Storage stores files such as images, videos, and audio as well as other user-generated content.
On choosing between Cloud Firestore and the Firebase Realtime Database, the Firebase documentation says:
Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing:
Realtime Database is Firebase's original database. It's an efficient, low-latency solution for mobile apps that require synced states across clients in realtime.
Cloud Firestore is Firebase's new flagship database for mobile app development. It improves on the successes of the Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales better than the Realtime Database.
*Realtime database store data only json format and it is specially used in app where data is synchronized concurrently like ola app(user location),sensex(Nifty) app where data not persist .
*Firebase Storage just only store data like memory card.It is specially used for store backend data of app.

Firebase : Differences between realtime database and file storage

I learnt about real-time data storage and hosting storage from this post Difference between Data Storage and Hosting Storage?
But i am still not clear about real time Database and and newly introduced file storage.
Does anybody have some brief explanation about it ?
Thanks in advance .
(As per the concern about duplicated with Difference between Data Storage and Hosting Storage? what the problem solves and what i am asking are two different things and hosting storage and file storage are different in case of google firebase )
Firebase now offers these places to store your data:
Realtime Database
Remote Config
Hosting
Storage
Cloud Firestore
The best place to store your data, depends on the type of data you want to store and the way you want to consume it.
The Firebase documentation says this about it:
The Firebase Realtime Database stores JSON application data, like game state or chat messages, and synchronizes changes instantly across all connected devices.
Firebase Remote Config stores developer-specified key-value pairs to change the behavior and appearance of your app without requiring users to download an update.
Firebase Hosting hosts the HTML, CSS, and JavaScript for your website as well as other developer-provided assets like graphics, fonts, and icons.
Firebase Storage stores files such as images, videos, and audio as well as other user-generated content.
On choosing between Cloud Firestore and the Firebase Realtime Database, the Firebase documentation says:
Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing:
Realtime Database is Firebase's original database. It's an efficient, low-latency solution for mobile apps that require synced states across clients in realtime.
Cloud Firestore is Firebase's new flagship database for mobile app development. It improves on the successes of the Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales better than the Realtime Database.
*Realtime database store data only json format and it is specially used in app where data is synchronized concurrently like ola app(user location),sensex(Nifty) app where data not persist .
*Firebase Storage just only store data like memory card.It is specially used for store backend data of app.

Resources