Skip navigation
Soabirw
Currently Being Moderated

AIR 3.1.0.4880 InvokeEvent Defect

Mar 15, 2012 11:17 AM

Tags: #mobile #3.1 #air_3.1

Recently upgraded to the AIR 3.1 SDK and have run into a show stopping issue regarding InvokeEvent on mobile devices.  The application is dispatching a new InvokeEvent each and every time you change orientation on the device.  And it isn't clearing the "queuedEvents" array.  Worst of all, the new event it dispatches each time is a clone of the last one recieved.  In the case of our application, this would be parameters that tell the application to load certain data.  So each time you change orientation, the application re-triggers that load sequence, causing lots of undersirable behavior.

 

The code is pretty simple to test out:

 

 

protected function preinitializeHandler(event:FlexEvent):void
{
    NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
}
  
protected function onInvoke(event:InvokeEvent):void
{
    trace(event.toString());
}

 

Now each time you change orientation you will see the trace statement and the event.target.queuedEvents collection continues to grow while never clearing any of the previously caught events out.

 

Rolling back to AIR 3.0 fixes this behavior.  And I've been able to demonstrate that in two separate projects.

 

I'd love to hear of a fix or work around so we can release using 3.1, but either way, I thought I'd make others aware of this issue as I haven't been able to find anything about it through my searching.

 

Eric Jensen

 
Replies
  • Currently Being Moderated
    Mar 20, 2012 11:16 AM   in reply to Soabirw

    You can try to use preventDefault() on the InvokeEvent to cancel it if you do not want it to run.

     
    |
    Mark as:
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    Mar 21, 2012 5:15 PM   in reply to Soabirw

    Hi Eric,

    Thank you for the additional information.  I think the best thing to do at this point is to add this to bugbase.adobe.com (if you haven't done so already.)  A couple of things I'd recommend.  First, please include a sample project so we can quickly verify the behavior.  Second, I'd recommend stressing at the top of the bug that this is an injected issue with AIR 3.1, it does not occur with AIR 3.0.  Finally, please post back with the bug URL so I can follow up internally.

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 18, 2012 11:05 PM   in reply to Soabirw

    I have the same problem on Galaxy Nexus but not on Galaxy S, a solution ?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 21, 2012 6:24 AM   in reply to pol2095

    Hi,

     

    I have the same problem on my Asus Transformer TF101 with ICS 4.0.3 with AIR 3.1, AIR3.2 and AIR 3.3 (beta3).

     

    Philippe

     
    |
    Mark as:
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    Apr 23, 2012 5:29 PM   in reply to Phil Flash

    I'd like to ask everyone affected by this issue to take a minute and vote for the following bug.  It currently has zero votes:

     

    https://bugbase.adobe.com/index.cfm?event=bug&id=3144722

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 23, 2012 10:02 PM   in reply to Chris Campbell

    I have an another bug with Air 3.4 on Android on Galaxy nexus

    Recently upgraded to the AIR 3.4 SDK and have run into a show stopping issue regarding InvokeEvent on mobile devices.  The application is dispatching a new InvokeEvent each and every time you stop the application with NativeApplication.nativeApplication.exit() and launch application with the multitasking button, not with the application icon, it isn't clearing the "queuedEvents" array,  the new event it dispatches each time.

    In the case of our application, this would be parameters that tell the application to load certain data.  So each time you change lauch application, the application re-triggers that load sequence, causing lots of undersirable behavior.

     
    |
    Mark as:
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    Sep 26, 2012 4:46 PM   in reply to pol2095

    @pol2095 - Have you entered your bug into bugbase.adobe.com?  If so, do you have a bug number handy?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 27, 2012 12:08 AM   in reply to Chris Campbell
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 27, 2012 1:49 PM   in reply to pol2095

    It isn't a bug, it's the default behavior for android.

     

    <activity android:launchMode="singleTop">
              <intent-filter>
                        <action android:name="android.intent.action.MAIN"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
              </intent-filter>
              <intent-filter>
                        <action android:name="android.intent.action.VIEW"/>
                        <category android:name="android.intent.category.BROWSABLE"/>
                        <category android:name="android.intent.category.DEFAULT"/>
                        <data android:scheme="mycustomuri"/>
              </intent-filter>
    </activity>
    

     

    the solution is to add android:launchMode="singleTop" in the application descriptor

     

    How to remove the bug report at bugbase.adobe.com ?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points