Orientation Change Event Firing Early on Android

Hello,
I'm noticing that the stage.oreintation_change event is firing before the orientation change happens, firing at the start of the change on Android 4.2.2. This results the stage.stageHeight & stage.stageWidth properties are incorrect when reading these values in the event handler. Works fine on iOS. Is anyone else seeing this using AIR SDK 13?
thx

After several hours' test and research, I think I found the solution. If auto orientation is needed, no aspect ratio can be specified in deployment descriptor or programtically set.

Similar Messages

  • VideoPlayer complete event firing early

    I'm not sure why this is happening, but for some reason the complete event is firing about 5-10 seconds into my minutes long video.
    Here is the code for the VideoPage that loads the video and listens for the events. Does anything seem off to anyone?
    package com.applied.flex.pages
         import com.applied.flex.events.PageEvent;
         import flash.events.ProgressEvent;
         import spark.components.VideoPlayer;
         import spark.events.VideoEvent;
         public class VideoPage extends BasePage
              private var _video:VideoPlayer;
              private var _startTime:uint = 0;
              private var _endTime:uint;
              private var _cuePoints:Array;
              private var _displayedPoints:Array;
              private var resetting:Boolean = false;
              private var seekSafe:Boolean = true;
              public var readyToStart:Boolean = false;
              public function VideoPage(xml:XML,majorType:String,minorType:String,path:String)
                   super(xml,majorType,minorType,path);
                   _video = new VideoPlayer();
                   if(xml..Video[0].@StartTime != undefined)
                        _startTime = xml..Video[0].@StartTime;
                   if(xml..Video[0].@EndTime != undefined)
                        _endTime = xml..Video[0].@EndTime;
                   _cuePoints = new Array();
                   for each(var i:XML in _pageXML.Video.CuePoints.children())
                        _cuePoints.push(i.@OnTime);
                   _video.addEventListener(VideoEvent.READY,doVideoReady);
                   _video.source = path;
                   this.addChild(_video);
              private function doVideoReady(e:VideoEvent):void
                   _video.removeEventListener(VideoEvent.METADATA_RECEIVED,doVideoReady);
                   if(_pageXML..Video[0].@EndTime == undefined)
                        _endTime = _video.totalTime;
                   readyToStart = true;
                   this.dispatchEvent(new PageEvent(PageEvent.READY_TO_START,false,false,0,this));
              public override function startPage():void
                   addListeners();
                   _video.seek(_startTime);
              public override function resumePage():void
                   addListeners();
                   _video.play();
              public override function pausePage():void
                   removeListeners();
                   _video.pause();
              public override function stopPage():void
                   removeListeners();
                   var ar:Boolean = _video.autoRewind;
                   _video.autoRewind = true;
                   _video.stop();
                   _video.autoRewind = ar;
              public function seekPage(seekTo:Number):void
                   if(seekSafe)
                        removeListeners();
                        _video.pause();
                        _video.addEventListener(VideoEvent.PLAYHEAD_UPDATE,doSeekSafe);
                        _video.seek(seekTo);
                        seekSafe = false;
              private function doSeekSafe():void
                   _video.removeEventListener(VideoEvent.PLAYHEAD_UPDATE,doSeekSafe);
                   addListeners();
                   _video.dispatchEvent(new VideoEvent(VideoEvent.PLAYHEAD_UPDATE));
                   seekSafe = true;
              private function addListeners():void
                   _video.addEventListener(VideoEvent.COMPLETE,dispatchPageComplete);
                   _video.addEventListener(VideoEvent.PLAYHEAD_UPDATE,doVidProgress);
              private function removeListeners():void
                   _video.removeEventListener(VideoEvent.COMPLETE,dispatchPageComplete);
                   _video.removeEventListener(VideoEvent.PLAYHEAD_UPDATE,doVidProgress);
              private function doVidProgress(e:VideoEvent):void
                   var scrubObj:Object = new Object();
                   scrubObj.currentTime = (e.currentTarget as VideoPlayer).playheadTime;
                   scrubObj.totalTime = _endTime - _startTime;
                   trace("playheadTime | "+e.currentTarget.playheadTime);
                   trace("end time | "+_endTime);
                   dispatchUpdateScrubber(scrubObj);
                   checkForCuePoint(e);
                   if(_video.playheadTime >= _endTime)
                        dispatchPageComplete();
              private function checkForCuePoint(e:VideoEvent):void
                   if(_cuePoints.length > 0)
                        if( (e.currentTarget as VideoPlayer).playheadTime > _cuePoints[0].toString() && !resetting )
                             var item:Object = new Object();
                             item.point = _pageXML..CuePoints[_displayedPoints.length].toString()+"<br><br>";
                             dispatchUpdateScrubber(item);
                             _displayedPoints.push(_cuePoints.shift());                         

    Not sure if you found an answer to your problem, but I have come across this a few times, and I eventually found that is was a "corrupted" FLV.  It seems as though at a given point in the encoding process, there is a little "skip".  This skip causes the COMPLETE event to fire when there might be a good amount of video left in the file.  Try making the FLV in a different encoding program and see if you still have your problem.

  • Resize vs. orientation change [Flex Mobile]

    Hello,
    The stage resize and orientation change events are "the same thing"?
    I have a SkinnablePopUp that I need to reposition when the orientation changes and I am listening for the resize event on the view.
    Should I be listening to the orientation change event instead?
    Thank you.

    Since pop-ups are parented to the systemManager, you should listen to resize events there instead. e.g.
    systemManager.addEventListener(Event.RESIZE, systemManager_resizeHandler);
    private function systemManager_resizeHandler(event:Event):void {
      // re-center pop-up
      PopUpManager.centerPopUp(popUp);
    Jason San Jose
    Software Engineer, Flex

  • Orientation change Android

    Hi, I have to say It's been a while i'm stuck on this problem and I'm about to disable orientation change for good.
    This post is my bottle in the sea !
    So I'll decribe my problem very shortly and clearly.
    I'm building my first Android APP with Flash cs6 and Air for Android SDK V 13.0.0.111
    My project properties (manifest) is set to Auto orientation, Auto Aspect Ratio.
    I'm using the event to trigger my project adaptations --> StageOrientationEvent.ORIENTATION_CHANGE
    When the stage flip, I gotoAndPlay("landscape or portrait") accordingly.
    I've tried many codes on the web, but i'm always facing the same problem.
    My event triggers just before the stage really flips. So I end up doing gotoAndPlay("landscape or portrait") before it is really required. But in the end in kinda works.
    I think that using auto orientation will always leave my in that situation and I'm looking for your help.
    Listen to this event to trigger my changeHandler function
    mainC.racine.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, changeHandler);
    function changeHandler(e:StageOrientationEvent):void
           if(e.afterOrientation)
                 if(mainC.racine.stage.orientation == StageOrientation.DEFAULT)
                   mainC.racine.debug.text="landscape"; 
                   mainC.racine.navA[currentView].gotoAndStop(2);
                else if(mainC.racine.stage.orientation == StageOrientation.ROTATED_RIGHT ||  mainC.racine.stage.orientation == StageOrientation.ROTATED_LEFT)
                     mainC.racine.debug.text="portrait";  
                    mainC.racine.navA[currentView].gotoAndStop(1); 
    Thank you for considering helping me.
    Sébastien

    I know this is old, but I just found a solution in my case, and figured i'd share.
    Instead of listening for "stageOrientationEvent.ORIENTATION_CHANGE", listen for "Event.RESIZE".
    Worked like freakin' pixie dust for me.
    Hope this helps someone!

  • Air for Android video object displays on orientation change

    I have an Android app that plays a video using the normal video object, ie:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    stream = new NetStream(nc);
    stream.client = this ;
    stream.addEventListener(NetStatusEvent.NET_STATUS, statusHandlerx);
    softwareVideo = new Video(640, 480);
    softwareVideo.x = 0;
    softwareVideo.y = 0;
    addChild(softwareVideo);
    When the video is playing if there is an orientation change, before the screen adjusts,  you can see a full screen version of the video behind the 640x480 in the area of the screen that adjusted yet.  So if the video is in portrait and the orientation is switched to landscape, in the right befow the stage adjusts to landcape you can see the right part of a fullscreen version of the video.
    Also when I remove the video object you can still see the last frame of the video in that area.
    HELP.  Is this a bug?

    Hi,
    Please log a bug at bugbase.adobe.com with a sample app(sources,swf,app-xml and assets) with which bug can be reproduced at our end. Also please mention the devices with OS version and the AIR build version on which bug is reproducible. A video demonstarting the bug would be really helpful for us.
    Also please mention the bug number here on forum so that we can look into this issue.
    -Nimisha

  • Shopping Cart Workflow - "Wait for change event" not firing?

    Hi there,
    I have a scenario where if I create a shopping cart above my spending limit it will go into the approver's inbox, that is fine.
    Now if I change the total value of the shopping cart to be within my spending limit the original workflow should be "logically deleted" and a "no step approval workflow" should be triggered.
    I see when the SC workflow triggers it also branches with a "wait for events", so that if it changes etc it will get caught here.
    When I change the SC it does not do anything, the value of the cart changes but it still sits in the approvers inbox and the "no step approval workflow" does not trigger.
    We are busy upgrading to SRM 5.0, it worked perfectly in the SRM 3.0 system we had.
    Any ideas what would cause the "change event" not to fire?
    Thanks for the help
    Lynton

    Hey Masa,
    You are the man!! That solved it.....I have implemented the BBP_WFL_SECUR_BADI and for whatever reason I set the security level to 4 when it should have been 2.
    4     "High" (workflow is never restarted when changes are made)
    3     "Medium" (WF restarted conditionally when changes are made)
    2     "Low" (workflow is always restarted when changes are made)
    1     "None" (changes to the object are not allowed)
    0     "Not defined"
    Thanks for the help
    Lynton

  • Textinput change event is not firing in datagrid

    Hi frnds
                    i am using simple datagrid in which textinput is rendered  in one column of grid.i want to apply dateformatter on that textinput for this i call a function on change event of that textinput but surprisingly change event is not occuring on textInput.can anybody please guide me how to fire change event of rendered textinput. or is there any way to apply dateformmter on datagrid's textinput rendrer.
    Thanks in advance
       Vineet osho

    Use a labelFunction that calls the dateFormatter

  • Orientation Change?

    I am developing an app for Android and iOS and I want to know how to make the app orientation change with the device orientation from portrait to landscape.
    Is there a way to make the same frame twice for each orientation and have it load the appropriate instance automatically? I would need it to load the 480x800 for portrait and then 800x480 for landscape. I would need it to stay on the correct frame as well. If I am on the contents page, I need it to stay on the contents page and not return to the main menu upon rotation.
    If there is a better way to do this, which I'm sure there is, please let me know! Thanks!

    Here is a simple method just add this to a new layer on frame 1 of the timeline
    Make sure the new layer spans the whole timeline not just 1 frame.
      stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    var isLandscape:Boolean;
    function resizeHandler(e:Event):void
        if ( stage.stageWidth > stage.stageHeight )
            isLandscape = true;
            goToAndStop( 10 ); 
        else
            isLandscape = false;
            goToAndStop( 5 );

  • Dynamic Action, validation check, on an Item, could not use Change event

    I am learning how to use Dynamic Actions in a 3.2.x app that was upgraded to 4.0.x. I wanted to share what I learned adding client side validation with these actions. Perhaps an Apex guru could suggest an easier method to use this feature.
    I have an existing function where a user selects multiple rows in a report page, and then assigns a single status and enters justification text for the selected rows in another page, then saves changes (via submit).
    One item, justification, is required. I replaced my JavaScript validation of an empty value, e.g., P10_JUSTIFICATION.value, with a dynamic action. The Change event was a candidate for this item, with the "is not null" Condition. However, it is possible to initiate this screen to review the status, overlook the justification text and immediately select a button to save changes. No Change event has fired. The Before Page Submit event was applicable here. This Event selection in the wizard does not provide the Item for definition and then the Condition wasn't the right context though available for selection. I selected JavaScript expression for the Condition, actually entered my original JS test expression, and created one True Action. The True action displays an Alert to tell the user that required text is missing.
    Test of this DA was not completely successful. The alert appeared but the page went on to submit anyway. I found I had to add another True Action, Cancel Event, to stop the submit. The DA was then successful.
    The Apex site examples, [http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm] , do a great job showing use of Change and Set Value events for Items but a user may not always navigate through items. These features were promoted for developers with no to little knowledge of JavaScript to use Apex for application development. This DA required using/understanding JS anyways.
    My next step is to implement actions on a tabular form that that has required values. It is disconcerting that I have read in the forum that the column value references such as f0x and its row number are required to get it all working (as a DOM or JQuery selector). I have already found that tabular form columns can be re-ordered from v3.2.1 to 4.0.x. I was hoping I could declare dynamic actions or simpler Javascript methods that would not rely on f0x array references.
    Thanks,
    Kelly

    It is disconcerting that I have read in the forum that the column value references such as f0x and its row number are required to get it all working (as a DOM or JQuery selector).Not necessarily. One possibility is to use descendent jQuery selectors to attach the dynamic action event handler by column heading:
    td[headers="HIREDATE"] input

  • No Data Change event generated for a XControl in a Type Def.

    Hello,
    Maybe I am missing something but the Data Change event of a XControl is not called when the XControl is used in a Type Def. or Strictly Type Def. (see the attached file).
    There may be some logics behind it but it eludes me. Any idea of why or any idea of a workaround still keeping the Type Def. ?
    Best Regards.
    Julian
    Windows XP SP2 & Windows Vista 64 - LV 8.5 & LV 8.5.1
    Attachments:
    XControl No Data Change event.zip ‏45 KB

    Hi TWGomez,
    Thank you for addressing this issue. It must be a XControl because it carries many implemented functions/methods (though there is none in the provided example).
    Also consider that the provided non-working example is in fact a reduction of my actual problem (in a 1000-VI large application) to the smallest relevant elements. In fact I use a  typedef of a mix of a lot of different XControls and normal controls, some of them being typedef, strictly typedef or normal controls and other XControls of XControls (of XControls...) in a object oriented like approach...
    Hi Prashant,
    I use a typedef to propagate its modifications automatically everywhere it is used in the application (a lot of places). As you imply a XControl would do the same, though one would like to construct a simple typedef when no additional functionality is wanted.
    The remark "XControl=typedef+block diagram" is actually very neat (never thought of it that way) because it provides a workaround by transforming every typedef into a XControl. Thanks very much, I will explore this solution.
    One issue remains: All normal controls update their displayed value when inserted into a typedef but not XControls. Data change event is not triggered. I known that XControls have some limitations (no array of XControls) but I would say, like TWGomez, that this is a “bug” considering the expected functionality.

  • Double value change event if cursor is set busy (LV2009)

    Hello everybody,
    I just migrated from LV 8.0 to LV 2009 (on linux) and now got problems with a value change event. I want to send a command if a button is pressed and send another one if the button is released. After sending the command I need to wait for an acknowledge from the receiver and to avoid user interaction in between I lock the cursor with "set busy" VI until the acknowledge is received. To see, when the button is pressed or released, I use a value change event. Inside the event structure the cursor is set busy.
    This worked reliable in LV 8.0 but not any more in LV 2009. The button's mechanical action is set to "switch until released" and if I press the button and keep it pressed it is reset to false automatically. The value change event is fired twice instead of only once (see attached vi) and "new value" is one time true and one time false. This doesn't happen if the mechanical action is set to "switch when pressed".
    Does anybody have an explanation or a workaround for this behaviour? Am I doing something wrong or is this a bug in LV? For now I'll just keep the cursor unlocked.
    Thanks for your help.
    Attachments:
    setMouseBusy_01.vi ‏11 KB

    Hi ckis,
    attached you'll find your modified example, it should do the trick now.
    Regards,
    Bernd
    Attachments:
    setMouseBusy_01.vi ‏9 KB

  • How to Disable Event firing while updating a list item using poweshell

    Hi All,
    I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
    However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
    Your help would be much appreciated. Thank you in anticipation.
    Regards
    Karthik R.

    hi
    check this thread:
    How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • In Reports what  is the difference between the AT NEW and ON CHANGE Event

    Hi,
            Could you tell the differences of AT NEW and ON CHANGE events in Repors

    Hi raghava,
    The Major Difference is :
    a) When AT NEW occurs,
    the alpha-numeric fields have ******* in their value,
    b) where as in case of ON CHANGE,
    the alpha-numeric fields have their corresponding value,
    of that particular record,
    where the Event gets fired.
    Other differences are :
    ON CHANGE OF can be used any where in the program..
    on change of differs from at new in the following respects:
    1.It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    2.A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    3.When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    4.When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    5.You can use else between on change of and endon.
    6.You can use it with loop at it where . . ..
    7.You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    8.Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    while
    AT NEW can be used only within a loop of an INTERNAL TABLE..
    5. Sample program to get the taste of it
    (just copy paste)
    6.
    REPORT ABC.
    DATA : BEGIN OF ITAB OCCURS 0,
    bukrs like t001-bukrs,
    f1(10) type c,
    end of itab.
    itab-bukrs = '1000'.
    itab-f1 = '1111111'.
    append itab.
    itab-bukrs = '1100'.
    itab-f1 = '3333333'.
    append itab.
    itab-bukrs = '1200'.
    itab-f1 = '555555'.
    append itab.
    AT NEW
    loop at itab.
    at new bukrs.
    write :/ itab-bukrs , itab-f1.
    endat.
    endloop.
    AT ONCHANGE
    loop at itab.
    ON CHANGE OF ITAB-BUKRS.
    write :/ itab-bukrs , itab-f1.
    ENDON.
    endloop.

  • On change event for dropdown box

    Hello,
    we have created view using EEWB as assignmentment block with some fields as dropdown.
    I want to change the dropdown values from second dropdown depend upon the first dropdown value.
    there no event firing on chaging the values from first dropdown list.
    I checked all methods do_handle_event, do_prepare_output and all setter methods including the set/get_v_struct. but still no luck.
    does anybody having any idea,  how to raise the event on value change from the first dropdown list.
    thanks
    Tim

    Hello Tim,
    And in GET_V of the attribute serving as dropdown you defined an event?
    * Set the type of the field:  dropdown menu
       CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'select'.
      ENDCASE.
    Best Regards,
    Yevgen

  • Event Fired when a mxml component is shown on screen

    hello,
    I have following application structure nested up to 2/3 level.
    Application
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    mxml componet in turn has similar structure
    componet
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    and end component is form which is shown and actions performed
    I want to execute specific code when the form is first time shown
    which will collect data from server and will show for further actions.
    User will edit/delete/update data with various button clicks.
    I tried activate event on end component but it seems that it wont get
    fired at all. End components are enclosed in BorderContainer or Group.
    To test activate event I have used Alert.show only but popup is not shown
    when I select link button on penutimate linkbar.
    If I am doing something wrong please let me know as well please
    guide me which event shall I use so that whenever linkbutton is
    pressed on linkbar it will fire that event. In that event I can check
    whether it has been called earlier by checking some variable which
    will be null in creation complete and set in event fired when linkbutton is pressed.
    Thanks and regards
    Raja

    I think 'creationComplete' is the closest event to what you are looking for.

Maybe you are looking for

  • Heartbeat Failure - CallManager Offline

    Hello, I'm having a rather unusual issue with Cisco Agent Desktop that I hope somone could give me some insight on.  First let me give you a little background.  All users in the company, over 300, were on Windows XP SP3 using CAD 4.5.7.4.  It was the

  • Deleted Inbox Mail not found in Trash

    After I have read email I delete them and expect they will appear in the Trash mail box. This is not happening. Is there a preference corruption that needs to me corrected? Version 10.3.9 Phil

  • Mail 4.6 and Exchange 2010

    I have a users using 10.6.8 and Mail 4.6 and when he syncs to our Exchange 2010 Server he gets his mail to June 16th but thats it. I have made use EWS is enabled and have trashed the mail.plist and all mail folders from ~/Libarary/Mail. I have also r

  • Connecting to an URL with a username and password?

    hey, I was trying to connect to a URL using: URL url = new URL("http://%20:[email protected]/Status.htm"); but it gets the 401 access denied page... Does anyone know how to get it to login correctly?

  • Local file transfer speed slow on E1200

    On a local file transfer (computer to NAS or NAS to computer) my file transfer speed with the E1200 is way too slow. I would expect the Wireless N speed to be at least 54mbps (megabits per second), which would be equivalent to 9 MegaBytes per second.