6 Replies Latest reply on Oct 12, 2014 9:41 PM by Kutir Mobility

    Can't enable screen rotation after disabling it

    Ruben Ruben

      Hi,

       

      I'm writing a javascript-based app, and while making use of the screenRotation API, I encounter the following problem:

       

      - According to the Documentation, I set screen auto rotation off: Rho.ScreenOrientation.autoRotate = false;

       

      - This works as expected, and the user no longer can rotate the screen. Eventually the user leaves the view, and I enable the autoRotate again by doing: Rho.ScreenOrientation.autoRotate = true;

       

      - I can see in the log that the code to enable autorotation is beeing executed:

           ScreenOrientationSingleton|  setAutorotate -- START

           ScreenOrientationSingleton|  setAutorotate -- autoRotate: true

           ScreenOrientationSingleton|  setAutorotate -- END

       

      - If I try to rotate the view again, I get:

           BaseActivity| Screen rotation is disabled. Force old orientation: 1

       

      And of course, no rotation happens.

       

      Can't I set the device to autorotate again?

       

      Thanks,

       

      Rubén Torrero