Reliable Detection of Orientation Change on Android Devices

I am using the book Build Mobile Websites and Apps for Smart Devices as guide for my current project. However, it does not recommend a technique for supporting orientation changes on Android. There seems to some stuff on stack overflow but nothing really concrete. It seems like every solution has significant problems. Anyone dealt with this issue in an efficient and reliable manor?

Thanks