Closing a sensor connection

After the MIDlet is no longer listening for data on a sensor connection, it is preferable to close the connection to save resources. This is done by calling the close() method on the relevant SensorConnection object:

sensorConnection.close()