I am trying to connect two Bluetooth devices using J2ME. Both devices connect successfully and also transfer data very well. If one of the devices has its Bluetooth switched off, how can the other device know that the connection has been lost?
MIDP= 2.0
cldc= 1.1
i am currently developing a J2ME game that works over bluetooth,
and you could run into two different scenarios, the first being one of the devices falling out of range and failing to deliver data and that can be solved by forcing the communicating devices to send acknowledgments on receiving data, and checking for that every fixed period of time, the second scenario which resembles yours, will cause an Exception, probably an IOException which can be caught and dealt with.
harshad