things that run on a thread result in crashing on device rotation with thread active
The really freaking sucks. When a spawned thread is running and the device is rotated, the thread isn't killed. It keeps running and when it references the activity or handler, it inevitably results in a force close. The affects all import/export operations that have a progress dialog.
I really have no idea what to do about this.
A mechanism to detect these cases could be deployed and calls to the GUI could be avoided in those cases if say a reference to the Thread object was kept in the Activity that spawns it and as the activity goes down, it can set a flag in the Thread or something. Seems like the Thread should keep on chugging regardless...
Updated by Tony Ciavarella over 9 years ago
- Status changed from New to Closed
- Target version changed from pie in the sky to 1.1.0
- % Done changed from 0 to 100
wow. silly android. the damn android:configChanges attribute of activity elements in AndroidManifest.xml can be used to make android not destroy activities on screen orientation changes. that seems to fix all the problems...