Skip to main content
Participant
August 16, 2011
Question

NativeApplication.nativeApplication.timeSinceLastUserInput returns -1 on iOS

  • August 16, 2011
  • 1 reply
  • 931 views

Hello,

I am using Flash Builder 4.5 to develop an application for iOS and when check the NativeApplication.nativeApplication.timeSinceLastUserInput property I get a proper value when using the Emulator on the desktop but it returns -1 when running on the device.  Is this a bug? I don't yet have an Android or Blackberry Tablet device for testing, does anyone know if this value returns correctly on these devices?

Looking at the bigger picture, I have an application that has a countdown timer displayed.  I use the systemIdleMode setting of KEEP_AWAKE to avoid the app suspending but I want to dim the screen after a certain idle period through actionscript to preserve battery life.  I am doing this by having a black backgroundColor on my TabbedViewNavigatorApplication and setting its' alpha value to 0.2 when the timeSinceLastUserInput gets over 30 .  This works great on the emulator but not on the device.  Any other way to accomplish this?

Thanks in advance,

-Jeff Kelley

independent application developer

This topic has been closed for replies.

1 reply

JD RoarkAuthor
Participant
August 23, 2011

Nobody can help on this?  Someone fro Adobe maybe?

Participating Frequently
August 23, 2011

Hi,

Unfortunately, the API is not yet supported on mobile platforms. You need to implement a workaround using mouse/keyboard event listeners.

Thanks,

Sanika

Participant
September 11, 2013

Bump.