0

I have a Location object and I want to save it in shared preferences, but I can't because it's an object, so I thought of saving latitude and longitude in shared preferences instead, but the problem is that location.getLatitude() and location.getLongitude() return Double and I can't save Double in shared preferences, however I can save Float, so my question is: Is it a good idea to save latitude and longitude as floats instead of doubles? Is there another way that I missed?

Mathew Hany
  • 13,310
  • 4
  • 19
  • 16

0 Answers0