nhachicha / SnappyDB

A key-value database for Android
1.78k stars 220 forks source link

How to save Location(android.location.Location) object #76

Open anoopbryan2 opened 8 years ago

anoopbryan2 commented 8 years ago

If I am saving the Location(android.location.Location) object in snappydb and fetching back snappyDB giving me an error: "Maybe you tried to retrieve an array using this method ? please use getArray instead Encountered unregistered"

davidtcdeveloper commented 8 years ago

The class android.location.Location does not have a constructor without arguments. I don't think you will be able to retrieve it using SnappyDB.

vladaman commented 8 years ago

I'd suggest you convert location to simple GeoHash and store it as string. See https://github.com/kungfoo/geohash-java