I would like to know as to what will happen to the thread which has been created by an activity and the device is rotated. I have observed that the onDestroy method is called when this happens. Will the thread be killed too?
If the thread is not killed, how can I reassociate the thread with the activity as a new instance of the activity is created on rotation.
Thanks,
Lakshmie
The thread is not killed. You can keep a reference to your thread by overriding
onRetainNonConfigurationInstance()to save the thread object and thengetLastNonConfigurationInstance()to get it back.