Save and load double values in shared preferences
<p>I have a <code>Location</code> 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 <code>location.getLatitude()</code> and <code>location.getLongitude()</code> return <code>Double</code> and I can't save <code>Double</code> in shared preferences, however I can save <code>Float</code>, 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?</p>