Skip to main content
Participant
Aug 16, 2011 3:10 PM UTC
Question

NativeApplication.nativeApplication.timeSinceLastUserInput returns -1 on iOS

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

JD RoarkAuthor
Participant
Aug 23, 2011 11:56 AM UTC

Nobody can help on this?  Someone fro Adobe maybe?

Translate
Participating Frequently
Aug 23, 2011 12:04 PM UTC

Hi,

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

Thanks,

Sanika

Translate
Participant
Sep 11, 2013 6:47 PM UTC

Bump.

Translate