我已将资源值存储在变量中,现在我想将此变量存储在 Firebase 数据库中,但数据类型是 Integer (int),我不知道我们是否可以在 Firebase 中存储整数。
我想在 Firebase 数据库中存储以下两个整数类型的变量:
int textColor = ResourcesCompat.getColor(getResources(),R.color.black, null);
int textSize = (int) (getResources().getDimension(R.dimen.text10sp));
最佳答案
Can I store Int value inside Firebase database?
当然可以,在 Long
类型的属性中,它是 supported data-type 。 int
值始终适合 Long
。
关于java - 我可以在 Firebase 数据库中存储 Int 值吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61203403/