Home > Net >  How to create a model class for dynamic keys and values in firebase database in android
How to create a model class for dynamic keys and values in firebase database in android

Time:10-30

How to retrieve all the key nodes and values inside a model class?

enter image description here

So try to change all values to String, and the code may remain unchanged or, change all values to be numbers and the use:

long value = ds.getValue(Long.class);

In case of keys, there is nothing you should do, as all keys are strings.

  • Related