-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaving devices are not being recorded #66
Comments
Just to understand more about this issue. Do you call disconnect method when the device leaves ecology? In Android, we call disconnect method in onDestroy() method. |
Well. For a client, disconnect means that you lost access to the server. I am not sure what is the relationship with |
For a native app, onDestroy() method is called when you close the app. so ecology is notified about the disconnection if we call disconnect method in onDestroy(). Similarly, we should implement it in cordova to notify ecology. Otherwise how will ecology know. In my demo apps, I used |
OK, I think we have a spec problem here. Notifying the client that he disconnected himself is not very useful (though it does count as a disconnection). Again, the point of the disconnect event is to be informed on the status of your connection with the ecology (that is currently centralized on the server, so this is really about connection to the server). It might be because you disconnected manually, but more often than not, that is because the connection has been interrupted. Maybe because the server app has been closed, or because the server device is not in range, or because the network channel got broken for whatever reason. This is what we need to detect.. |
This is true in the other direction of course. The server needs to know if a client has been disconnected even if that client did not call |
A very simple way to test it is to launch the reacology-boilerplate. |
It seems that
ecology.getAvailableDevices
does not update the devices that have left. Once a device has been connected, it is always returned by this method.Experienced when using
cordova-ecology-plugin
andreacology-model-sync
.The text was updated successfully, but these errors were encountered: