I'm writing some Bluetooth App. So I have written a class which handles the Bluetooth communication using threads and message handlers. At the moment I create an instance of this class in an Activity and this instance of my Bluetooth class establishes a connection. Fine.
Now when the display is rotated the Activity gets destroyed and so is my Bluetooth class instance, therefore it has to disconnect. I understand how to keep data through the display rotation and I already implemented that the recreated Bluetooth class instance will automatically reconnect after a rotation.
However I would like to keep the Bluetooth connection up during rotation, that is I not only want to preserve some data during the roation, I want to keep the Bluetooth class instance "alive". But to do so I would have to put the Bluetooth class instance to some save place out of the Activity.
It there any way to do this?