Firebase 远程配置 getInt() 丢失

Jam*_*mes 10 firebase firebase-remote-config

Firebase 提供以下方法:

  • 获取布尔值()
  • getByteArray()
  • getDouble()
  • getLong()
  • 获取字符串()

https://firebase.google.com/docs/remote-config/use-config-android#get-parametervalues-to-use-in-your-app

但是此列表中缺少 getInt(),我很好奇是否有原因?使用 Long 或 String 并强制转换/转换为 int 的首选方法是什么?

Jak*_*eam 3

奇怪的是, iOS 好像有这个功能

由于int是 的子集long,您应该使用它来存储您的整数。