• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

USER_IDLE or USER_PRESENT event in adobe air for ios

Guest
Dec 21, 2012 Dec 21, 2012

Copy link to clipboard

Copied

Hi All,

Does anybody is having any idea that how can we detect the user Idle time in Adobe air based ios mobile application.

For a desktop based air project this can eaisly be defined by the below two events:-

1) flash.events.Event.USER_IDLE

2) flash.events.Event.USER_PRESENT

But its very painfull to know that these events are not going to work with the mobile applications.

If anybody is having any idea,please let me know.

Any help will be appriciated.

with Regards,

Shardul

TOPICS
Development

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 29, 2013 Aug 29, 2013

Copy link to clipboard

Copied

Hi, sorry to bring up such an old post (I just found it while googling), but since it never got an answer, I thought I'd bump it up, because I'm having the exact same problem now. There's really no way to make these events work in iOS, or any valid alternative?

I've filed a feature request in bugbase, just in case this can be fixed. Please vote if you're having the same issue:

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

Happy belated Christmas 2012! 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 05, 2013 Nov 05, 2013

Copy link to clipboard

Copied

LATEST

This is possible a possible workaround on mobile. I am currently testing this on iOS.

Use:

import mx.core.FlexGlobals;

import mx.core.mx_internal;

import mx.events.FlexEvent;

import mx.managers.ISystemManager;

systemManager = Application(FlexGlobals.topLevelApplication).systemManager;

systemManager.addEventListener(FlexEvent.IDLE, userIdleHandler);

and then the handler looks something like this:

private function userIdleHandler(e:FlexEvent):void

{

     if(e.currentTarget.mx_internal::idleCounter == 300){ //300 = 30 seconds

       trace("idle timeout");

       //do stuff

     }

}

The only real problem Im having with it is that if the user hits the home button and the app suspends, upon resuming the idleCounter is > the threshold number and never gets reset when the user is making touches/presses/clicks.

If you guys refine this post your updates.

Thanks,

Jason

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines