Thanks Steve for your recommendations. I consider that I have a good level of programming with App Inventor but not so much regarding the cloud systems that I am investigating.
So far, I will describe the best solution I have found.
Regarding your question, the format of the files I need to store in the cloud is JSON, and they are very small (maximum 50 KB). Then my app processes the structured content in the JSON and shows it to the user in a nice way.
My first attempt was to use Firebase Storage, but I see in the licensing that they charge for number of writes and number of reads. Instead, Dropbox only charges for writes and not for reads.
The question I have is if the basic Dropbox Personal account allows all users who use my app to write files using a single dropbox account. That is, the owner of the dropbox account is my app. Anyone know if I would be breaking the license? The idea is that as each user shares their files by creating random links, they decide with whom they want to share them.
The second part that I try to solve is that users know in real time if the file has changed. That is, if they are viewing the contents of a file in the app and at that time it changes, the app should download the latest version of the file and replace the content on the screen. If they have the app in the background, it would be sufficient for the content to reload when the app returns to the foreground.
For this part, I have thought about using Firebase Cloud Messaging. If I have understood it correctly, it will allow me to create closed groups of subscribers, so that when a user shares a random link that has been created in dropbox, other users (only authorized ones) will receive the notifications every time an update of the file occurs.
Of course there is no magic in this part, neither dropbox nor firebase will send notifications automatically. I am planning to schedule the sending of notifications using Firebase Cloud Functions, as follows. Every time a user (from my app) modifies an existing file in dropbox, it runs a Firebase Cloud Functions function that is responsible for sending notifications to subscribers that match a specific “tag”. The tag will be for example the random link created in dropbox.
Subscribers, meanwhile, when they open the app, the Firebase Cloud Messaging service is invoked with the tag corresponding to the file they want to monitor. And from that moment they will start receiving notifications every time there is a change.
I hope I have explained myself well, although surely there are aspects that are not yet well tied.