I am working of building a multiplayer game using bluetooth, however I need to be able to detect and manage errors.
For example a 2 person game, one phone may move outside of the bluetooth range for just a moment, and then return, can this be handled in some way?
Bluetooth has the following Exceptions (JSR 82 see http://java.sun.com/javame/reference/apis/jsr082/ )
Is it possible to detect when a Bluetooth device moves out side of the range of another?
With a device having moved outside of the range, trying to communicate with that device will result in a null pointer exception. Is it possible to know that the device has moved outside the range?
Having moved outside the range for a few seconds the device moves back within range, can this some how be detected, and the original connection re-established?
Is their some way to define that if a device has moved outside the range for a predetermined amount of time that the device is now no longer available?
Also is it possible to detect if a device that you are in communication with suddenly dies, i.e. switched off by the user, interrupted by another application etc.
If none of this is available is JSR82, can you recommend any other implementations that provide some or all of this functionality.
Thanks in advance for any insight you may have on this.