是否可以将简单数据(例如string/int/double)存储到Firebase存储中? [英] Is it possible to store simple data (such as string/int/double) into Firebase storage?

查看:77
本文介绍了是否可以将简单数据(例如string/int/double)存储到Firebase存储中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个称为CardModel的类,它像一个容器一样工作,并存储cardName(作为字符串),标题(字符串),gps坐标(双精度)和其他一些东西.我希望能够将cardModel对象存储到Firebase中.但是,似乎Firebase存储仅处理文件/URI/和与照片或视频有关的任何事情.我必须使用Firebase实时数据库存储自定义对象吗?而且Firebase数据库能否成为唯一存储简单数据类型(例如字符串,双精度数和整数)的数据库?

I have this class called CardModel that acts like a container and stores the cardName (as string), a caption (string), gps coordinates (double), and a few other things. I want to be able to store a cardModel object into Firebase. But it seems Firebase storage only deals with Files/URI/ and anything to do with photos or videos. Must I use the Firebase real time database to store my customized objects? And can Firebase database be the only one to store simple data types such as strings, doubles, and ints?

希望你们能提供帮助.

Hope you guys can help.

干杯〜

推荐答案

Firebase实时数据库是用于存储此数据的理想工具.为了帮助您找到不同之处,我提供了一个方便的指南,其中介绍了每种产品的功能.

The Firebase Realtime Database is the perfect tool for storing this data. To help you navigate the differences, I've included a handy guide that covers what each product does.

存储数据的最佳位置,取决于要存储的数据类型和使用方式.

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.

Firebase文档对每种产品都这样说:

The Firebase documentation says this about each product:

  • Firebase实时数据库存储JSON应用程序数据(例如游戏状态或聊天消息),并在所有连接的设备之间即时同步更改.

  • 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存储开发人员指定的键值对,以更改应用程序的行为和外观,而无需用户下载更新.

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托管为您的网站托管HTML,CSS和JavaScript,以及其他开发人员提供的资产,例如图形,字体和图标.

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存储图像,视频和音频等文件以及其他用户生成的内容.

Firebase Storage stores files such as images, videos, and audio as well as other user-generated content.

这篇关于是否可以将简单数据(例如string/int/double)存储到Firebase存储中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆