<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic how I implement?! can a help in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118619#M75068</link>
    <description>&lt;P&gt;how I implement?! can a help me?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2016 11:11:43 GMT</pubDate>
    <dc:creator>Felipe_X_</dc:creator>
    <dc:date>2016-07-07T11:11:43Z</dc:date>
    <item>
      <title>Orientation Lock landscape!</title>
      <link>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118617#M75066</link>
      <description>&lt;P&gt;&lt;SPAN id="result_box" lang="en"&gt;&lt;SPAN&gt;I created a&lt;/SPAN&gt; &lt;SPAN&gt;menu&lt;/SPAN&gt; &lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;my game,&lt;/SPAN&gt; &lt;SPAN&gt;so&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt; &lt;SPAN&gt;menu&lt;/SPAN&gt; &lt;SPAN&gt;can be&lt;/SPAN&gt; &lt;SPAN&gt;displayed&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;landscape&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt; &lt;SPAN&gt;I'm using&lt;/SPAN&gt; &lt;SPAN&gt;the plugin&lt;/SPAN&gt; &lt;SPAN&gt;Screen&lt;/SPAN&gt; &lt;SPAN&gt;Orientation&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;android&lt;/SPAN&gt; &lt;SPAN&gt;works correctly.&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN&gt;How do I&lt;/SPAN&gt; &lt;SPAN&gt;display this&lt;/SPAN&gt; &lt;SPAN&gt;menu&lt;/SPAN&gt; &lt;SPAN&gt;(made&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;Canvas&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;phaser&lt;/SPAN&gt; &lt;SPAN&gt;js&lt;/SPAN&gt;&lt;SPAN&gt;) is&lt;/SPAN&gt; &lt;SPAN&gt;displayed only&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;landscape&lt;/SPAN&gt; &lt;SPAN&gt;on the iPhone&lt;/SPAN&gt; &lt;SPAN&gt;too&lt;/SPAN&gt; &lt;SPAN&gt;?!&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN&gt;* &lt;/SPAN&gt;&lt;SPAN&gt;excuse&lt;/SPAN&gt; &lt;SPAN&gt;the&lt;/SPAN&gt; &lt;SPAN&gt;horrible&lt;/SPAN&gt; &lt;SPAN&gt;English&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 11:52:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118617#M75066</guid>
      <dc:creator>Felipe_X_</dc:creator>
      <dc:date>2016-07-06T11:52:35Z</dc:date>
    </item>
    <item>
      <title>That plugin seems to work</title>
      <link>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118618#M75067</link>
      <description>&lt;P&gt;That plugin seems to work differently on iOS than it does on Android. Here's some sample code that might help you figure it out:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;app.testToggleOrientation = function() {
    "use strict" ;
    var fName = "toggleOrientation():" ;
    app.consoleLog(fName, "entry") ;

    var str = "" ;
    var screenOrientation = "unknown" ;

    if( window.cordova ) {
        try {
            if( cordova.platformId.match(/ios/i) ) {
                screenOrientation = screen.orientation ;
            }
            else if( cordova.platformId.match(/android/i) ) {
                screenOrientation = screen.orientation.type ;
            }
            else {
                screenOrientation = "unknown" ;
            }

            if( screenOrientation.match(/landscape/i) ) {
                screenOrientation = "portrait" ;
                screen.lockOrientation(screenOrientation) ;
            }
            else if( screenOrientation.match(/portrait/i) ) {
                screenOrientation = "landscape" ;
                screen.lockOrientation(screenOrientation) ;
            }
            else {
                screenOrientation = "unlocked" ;
                screen.unlockOrientation() ;
            }

            str = "try succeeded, screen orientation set to: " + screenOrientation ;
            app.consoleLog(fName, str) ;
        }
        catch(e) {
            str = "try failed: " + e ;
            app.consoleLog(fName, str) ;
            app.alert(str) ;
        }
    }

//    app.flashBackground("#"+Math.floor(Math.random()*16777215).toString(16), 0) ;
    app.consoleLog(fName, "exit") ;
} ;



app.windowEventOrientationChange = function() {
    "use strict" ;
    var fName = "windowEventOrientationChange():" ;

    var str = "" ;
    var screenOrientation = "unknown" ;

    if( window.cordova ) {
        if( cordova.platformId.match(/ios/i) )
            screenOrientation = screen.orientation ;
        else if( cordova.platformId.match(/android/i) )
            screenOrientation = screen.orientation.type ;
    }

    str = "Screen orientation is: " + screenOrientation ;
    app.consoleLog(fName, str) ;
//    app.alert(str, 1000) ;
} ;
window.addEventListener("orientationchange", app.windowEventOrientationChange) ;

&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 22:45:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118618#M75067</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-07-06T22:45:07Z</dc:date>
    </item>
    <item>
      <title>how I implement?! can a help</title>
      <link>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118619#M75068</link>
      <description>&lt;P&gt;how I implement?! can a help me?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 11:11:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118619#M75068</guid>
      <dc:creator>Felipe_X_</dc:creator>
      <dc:date>2016-07-07T11:11:43Z</dc:date>
    </item>
    <item>
      <title>Felipe -- the code I provided</title>
      <link>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118620#M75069</link>
      <description>&lt;P&gt;Felipe -- the code I provided is quite clear on how to handle the differences between iOS and Android. Please read the code.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:34:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Orientation-Lock-landscape/m-p/1118620#M75069</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-07-07T16:34:12Z</dc:date>
    </item>
  </channel>
</rss>

