Automatic update of URLs in firebase storage [duplicate] - flutter

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am building an app in Unity using Firebase Realtime Database and Firebase Storage. I need to add functionality in the client app that is triggered when a particular Storage directory is updated. The update could happen from the Firebase console itself, not necessarily from the client app.
I know you can monitor for changes of a database node, but there doesn't seem to be a quick way to monitor for changes of a storage directory. I could poll for changes, but it would be better to get realtime update.
Should I look into using Cloud Functions to update the database when the storage is updated so I can be notified in the client app? Or perhaps use Cloud Messaging? Please point me in the right direction.
Thank you.

There is nothing build into Cloud Storage for Firebase to inform client-side code.
The typical way to solve this is to write an update to the database whenever the file in storage is updated. That way you can keep an active listener on the database.
But sending an FCM message is also a valid option. Such a message is called a tickle, since it tickles the app to get it into action.
You could do either of those from Cloud Functions, or from within the application code itself. But if you also want to capture updates from the Firebase console, Cloud Functions is really your only option.

Related

Push notifications on production with expo, react native and MongoDB [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 months ago.
Improve this question
The following question is just for advice (I don't want you guys to do my homework for me). I know I'm new to the expo and react native environment, but I can get by with your advice.
Currently I have a mobile application made with expo and react native and that shows daily weather data, in a graph it shows the data every hour (for example, average temperature). Weather data is taken from a database built on MongoDb. What I want now is that my application during the course of the day, when the temperature exceeds a higher value in the MongoDb database, a push notification is displayed in the mobile application (in production).
What I am thinking is to make an API (either in NodeJS or Python) that is constantly monitoring the database so that when a high value is reached, it sends an alert to the application and finally it can display the push notification. Now I have doubts because, how do I make my application keep listening in the background?
I have heard about firebase and apple push notification (since I am going to make the application on android and ios). Is there a way to not depend on these services?
I just want to know what path I can take and what tools I can work with to achieve what I propose. Monitor the MongoDb database, so that when a value is too high, it sends a push notification to the mobile application (in production).
Thank you all for your answers.

How can I build backend services for my mobile app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 12 months ago.
Improve this question
I want to learn to build a simple log-in page using Flutter with its backend services. Is this infrastructure good? Are there any suggestions?
The profile picture of the user must be stored on a cloud storage
To check the identity of the user and to retrieve the profile picture
I guess a databank should do the work.
The user should see when was the last time he/she logged in. How can I do it?
I want to use Firebase to do it.
As I understood that you want to develop a simple login app with authentication using Firebase.
Firebase console services enable you to authenticate and firebase storage can be used to store and retrieve the login data. You can implement something like storing the date-time at every login or logout and save it in db. Update it if the login user entry exists previously otherwise add new entry to the table.
You can visit below link to read about how to implement firebase storage. It will provide you database as well as cloud storage service. So nothing other than that is required.
Pub dev for firebase storage

Persist data after app killing in Flutter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am building an online shop app using Flutter, and I am wondering what is the best way to persist data after the user exit the app or when the app is killed. The data I want to persist is the cart information, which contains a complex structure.
It worth mentioning that I'm using Provider for state management.
I was thinking of the below approaches:
Creating a local file and read/write info from/to it.
Shared preferences
The new Flutter feature with RestorationMixin, (I don't know how to deal with a complex structure in addition to using Provider).
SharedPreferenceis the possible solution for you.
you can convert your object into json String by using jsonEncode(object) and save it in the sharedpreference and when you need back the object from json string you can use jsonDecode(string) to get your object back.
If you want to save the data offline. I'd suggest using sqflite. SQFlite is an sql database that will be saved locally on the device. It's easy to use and is persistant as you requested.
If you want to save data online in the cloud somewhere then I'd advice looking into Firebase (Google database, works really well with providers) or mongodart (MongoDB database)

What database to choose from? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Realm Database or MySQL or MongoDB or the standard Firebase.
I am curious why would anyone choose one over another. I am in a group project and one of the members in the group suggested that we should use Realm Database over Firebase. He tried to explain to me the reason but I was not able to comprehend.
What has your experience been like? Is one database more user-friendly over another?
Firebase seems to have very nice documentation.
Which one would you guys suggest?
Those are three different things.
Realm is a database for storing content locally on a device.
MySQL is usually used together with a web server. If you have a server and need to store data, you can use MySQL.
Firebase is Google's alternative for building your own server. It gives you tools that allow you to avoid having to build your own web server, such as Firestore, which lets you do CRUD operations directly from devices without needing to send that information through a server first.
If you works on small project you must going with MYSQL database. Its very simple and easy to understand. But if your project are big like that organisation type projects I recommend you to going with MongoDB.

Are there any good tutorials on linking an iPhone app to a database? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have built an iPhone app that needs to pull data from a server. First I need to figure out what kind of server I will need. I'm a bit familiar with MySQL but was wondering if anyone had better suggestions on a backend. My app will have two tables that need to be populated by data residing on a server. Also, a user can submit data to this database which in turns populates the previously mentioned tables.
If you have any tips or tutorials, code snippets, etc. it would be really appreciated!
*Edit: I should mention this IS a remote database
Well if it's a remote server your thinking about then you should be looking into implementing some kind of service architecture like Web Services over SOAP or REST.
If the data stays on the iPhone than by all means use SQLite as it's fast and lightweight.
I would recommend starting with SQLite and local data first. Then when you have your main program logic, flow and UI complete, replacing the SQLite with Web Service calls.
Your database sounds really simple with just two tables. Perhaps you don't even need a SQL database. Perhaps a Berkeley DB would be sufficient. It has atomic commit, transactions, rollback etc. However you store data as key-value pairs.
However I am not sure if you can use it as a server. You could consider accessing the data through something like remote objects. This is done very easily in Cocoa. You could build a Berkeley DB on your sever that hosts the data as distributed objects that your iPhone app connects to.