BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-23-2008, 07:05 AM   #1 (permalink)
New Member
 
Join Date: Sep 2007
Model: 7290
PIN: N/A
Carrier: BPL MOBILE
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to detect that userinterface is kept idle

Please Login to Remove!

Hi. i am developing a financial application. i want to add time out thing after 15 min. but how can i detect that the UI is ketp idle that is no action has been taken.

please if any one has any idea let me know.
Offline  
Old 05-23-2008, 09:48 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

What are you timing out from and what action do you want to take when the timer goes off?
Offline  
Old 06-19-2008, 07:17 AM   #3 (permalink)
New Member
 
Join Date: Sep 2007
Model: 7290
PIN: N/A
Carrier: BPL MOBILE
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

its like timout or as in a web application we have session invalidation
Offline  
Old 06-20-2008, 07:26 AM   #4 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

umm.. don't have an exact or good answer for ur query, but here's something that we can use....

After a screen is rendered, suspend painting and note the time or start timer.
When a key is fired and paint is called.. check if painting suspended. If suspended, calculate the time from when it was suspended and compare with the timeout duration. You may resume painting if timeout is not exceeded.

I think this suspend-resume and checking isSuspended etc. can be checked with listener too..

am not sure if this works...Just knew the APIs so thought of this.
isSuspended, suspendPainting etc. are available in UIApplication.

Will let u know if i have a cleaner way to do this
Offline  
Old 06-21-2008, 11:44 AM   #5 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

How about DeviceInfo.getIdleTime() ??

Returns the number of seconds since the last key or trackball event.

-de
Offline  
Old 06-24-2008, 02:02 AM   #6 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Red face

oopps... ya.. missed that!
Yes, getIdleTime is a lot better !!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.