I would like to store/retrieve doubles in Firebase but if I store a whole number like 5.0, Firebase will drop the 0 and upon retrieval, I get an illegal cast from long to double. One solution would be to store and parse floating point values from strings but Firebase says it will support double type so I'd prefer to use it if possible.
double val = 1.0;
dbref.child(child).setValue(val); // '.0' dropped in db
double count = (double)dataSnapshot.child(child).getValue(); //illegal cast from long to double