1 function onSuccessCallback ( ori ) {
2 console.log( ori.status );
3 if ( ori.status === "PORTRAIT_PRIMARY" ) {
4 window.screen.lockOrientation( "portrait-primary" );
6 else if ( ori.status === "PORTRAIT_SECONDARY" ) {
7 window.screen.lockOrientation( "portrait-secondary" );
9 else if ( ori.status === "LANDSCAPE_PRIMARY" ) {
10 window.screen.lockOrientation( "landscape-primary" );
12 else if ( ori.status === "LANDSCAPE_SECONDARY" ) {
13 window.screen.lockOrientation( "landscape-secondary" );
16 function onErrorCallback ( error ) {
17 console.log( "An error occurred " + error.message );
21 if ( $.tizen.__tizen__.util.isMobileBrowser() ) {
22 tizen.systeminfo.addPropertyValueChangeListener( "DEVICE_ORIENTATION", onSuccessCallback, onErrorCallback );