futurice / vor

The new IoT Office Experience.
http://vor.space
MIT License
47 stars 10 forks source link

Stop listening to keep-alive messages #55

Closed luisramalho closed 8 years ago

luisramalho commented 8 years ago

Kenta's beacons are sending a keep-alive type of message, like this:

{"type":"keep-alive","id":"toilet8am"}

In the SharedPreferences we are saving/updating based on the ID, so when the client gets that it assumes it's an update, but it's not. So we can just ignore it for now.

The keep-alive message comes every 5 minutes or so, not sure what to do with it yet. One suggestion would be to just keep a timer and if we don't get any message for like 5+ minutes than just say "Service Unavailable" or something. This raises a problem that we will be saving to SharedPreferences much more often, literally every 5 minutes to everything we have. Not sure if this is ideal. What are your thoughts?