Added support to flipping device orientation to the demo.