简体   繁体   中英

Synchronizing Firebase Storage Bucket CSV with Raw Files Android Java

I am looking for guidance in a proper way to use Firebase's Storage in order to synchronize some CSV files copies of which are stored in raw on the local device. I'm fairly new to Firebase storage.

Essentially, I wish to be able to push any changes made to the Firebase Bucket onto the local device. So anytime a CSV file is updated, a new one is added, or one is removed, I wish that to be synchronized with the copies stored on the device. Using the realtime database to store these CSV files in JSON is not an option for various reasons. It might also be worth mentioning that any file changes will be made by hand on the Firebase terminal.

I'm aware that Firebase allows us to list all the files contained at a reference point by calling.listAll() on a storage reference. However, I cannot find any documentation on this function or how to detect and update file changes.

Any help you can give me would be appreciated.

Cloud Storage for Firebase does not offer any APIs for automatically synchronizing objects in storage buckets between the client and server. It doesn't work at all like Realtime Database.

If you want to implement this, you will need to write a lot of code to implement that synchronization on your own. It won't be easy. You can take advantage of the sync provided by Realtime Database to reference which content might be new (if you store dates and paths to Storage), but ultimately, you will have to download and delete files manually as needed to make sure the client is up to date.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM