Is it possible to create offline firebase app? - firebase

I am trying to create a simple notetaking app(ios/android) with the ability to save text and pictures to cloud storage (am using firebase).
so the prototype works fine except when offline.
Firestore has offline capabilities, but Google sign-in does not allow silent-login authentication when offline. (issue)
How can I solve this with just using firebase authentication?
One solution could be storing data offline in files Files and then when online, Authenticate with firebase (run googleSignIn.signInSilently()) and push data to firestore.
Is there a simpler way to do this?

Related

Is it a must to use firebase when deploying a flutter app even though I am using firebase in my code?

I have a flutter app, I previously deployed, which I added firebase even though I didn't use their database. Now, I have another project that does not use firebase. My question is:
Is it a must to use firebase when deploying a flutter app even though I am using firebase in my code?
There is no (explicit or implicit) requirement to use Firebase for your Flutter app. And even when you use Firebase, you don't have to use all of its (18 or so) products.
You can use parts of Firebase that you like, and use alternative products that you prefer for other parts.
For example, it is quite common for (Flutter) web apps to use Firebase Authentication to sign users in, and then use one of the databases in Firebase (Firestore or Realtime Database) to store data, but then deploy the web app to a non-Firebase hosting provider.
It's also quite common for (Flutter) web apps to use Firebase Cloud Messaging to deliver push notifications and background data messages, but no other parts of Firebase.

Is it possible to upload data to Cloud Firestore via Powershell with user Authentication?

I can't see much online as to whether it's possible to upload data to Cloud Firestore via Windows Powershell, I know you are able to upload data to the Realtime Database fairly easily, but is this possible for Cloud Firestore?
I need to be able to authenticate a user for upload to follow the database rules and upload rather than using the service account key?
Thanks for any answers or advice you may be able to provide me with.
If you are asking if there is a similar mechanism as the Firebase CLI for reading and writing data to Firestore as there is with Realtime Database, the answer is no, there is no provided tool for that. It currently only provides a mechanism to delete data.
You are certainly free to write your own program using the JavaScript client libraries, which have limited support for Firebase Auth and Firestore on nodejs. You can then invoke your program on the command line. You could also use the REST APIs for both products to write something in any language you want.

How do I access Cloud Firestore when created as a service within Cloud Platform?

I'm familiar with using Cloud Firestore when created through Firebase, but I've created a Cloud Firestore as a service within Cloud Platform and I can't figure out how to have a client access that database. I was expecting there would be someway to generate a GoogleService-Info.plist so that my iOS app can access Firestore.
How is Cloud Firestore different when created from GCP, and how can clients access it?
If you want to access Firestore from iOS, you will still have to go through the Firebase console to add your app to the project and generate that plist file.
What you probably don't realize is that a Firebase project is just like a GCP project. Every Firebase project IS a GCP project, just pre-configured with some services and APIs enabled. Read this blog for a full discussion. If you created your project via the Cloud console, you can just as easily access the very same project from the Firebase console.
Your Firstore instance is 100% the same, no matter how you access it. All the same data and scaling behavior that you expect from Firestore. The only differences lie in how Firebase client apps add special mobile functionality. Read this blog for a full discussion specific to Firestore.
Bottom line is that, for use with mobile apps, you should still use the Firebase console to set that up. You can use both console together at the same time. They show almost entirely the same data, but Firebase is simplified for mobile-centric use.

What is the standard way to store images and data with Firebase?

We need to store user data on a database. We also need to store content/info data and images to be dynamically served to the users via a PWA.
When I tried creating the Firestore DB for the users, Firebase warned me:
"Enabling Cloud Firestore will prevent you from using Cloud Datastore with this project, notably from the associated App Engine app"
If this means that we cannot use Firestore and Storage together, what is the standard way to have a database and image content to be served to the users, with Firebase?
Cloud Datastore is not Cloud Storage. They are different Google Cloud products. If you enable Firestore, you will still be able to use Storage just fine.

How to add option for user to backup his personal files(Text) from a mobile app with that backup connected to his google account?

This is a simple Memo App for writing memos in which I want to add an option for the user to back up his writings online.
User must login through his google account first. and the app already saves user files locally in a database file. So, I want to find a way to store that DB file onto storage that is user-specific(Firebase/Google Drive).
Use Firebase Firestore rather than a local database. This way everything will be saved into the cloud and you get firebase's offline capabilities and syncing too.
This plugin is useful for setup: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore

Resources