BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-01-2005, 12:36 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Alarm/Time Feature

Please Login to Remove!

Hello everybody. I'm developing an application for OS4(specifically 7510/7520). Users have requested a "feature" to connect to the internet at a specific time of the day to update the handheld's data(for example, every day at midnight). My app already connects to the internet and updates its data and such, but not on a timed basis by itself.

Assuming the user leaves the radio on, how should I go about implementing this?

One thing I can't assume is that my application will be running at the time of sync. That means I need some external method to execute my application.

Any ideas? Thanks!
Offline  
Old 07-01-2005, 02:16 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2005
Location: Columbus, OH
Model: 7100G
Posts: 44
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Look at the Timer API...its easy just make a class that implements TimerTask (just like a thread) and it will work for you.
Offline  
Old 07-06-2005, 04:09 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello! Thanks for the response. The timer works, but I can't seem to get the UI Application to push screens. Any idea how I could display some data on the screen from the timertask?

-Chris
Offline  
Old 07-07-2005, 01:55 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2005
Location: Columbus, OH
Model: 7100G
Posts: 44
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by pogi
Hello! Thanks for the response. The timer works, but I can't seem to get the UI Application to push screens. Any idea how I could display some data on the screen from the timertask?

-Chris
Since this works like a thread you'll have to use the getApplcationEventLock something like that ot change things on the screen. What you have to do is get this object and sync off of it. I would do a search on that to find examples This should be enough unless you need to do something that takes a lot of time. If you need to do something with popup boxes I have had to post a global event from a thread and catch it from the application.

Hope this helps
Offline  
Old 07-08-2005, 12:18 PM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yea I need to take a lot of time. I tried synchronizing to the getApplicationEventLock() and it gave me an error of some kind(can't think of it now). I'll check out global events and how to catch them. Seems like the way to go. Thanks!
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

2x M41464-10 OKI Fast 100ns 64K x 4-bit Dynamic NMOS RAM DRAM Memory IC D41464
$6.19
2x M41464-10 OKI Fast 100ns 64K x 4-bit Dynamic NMOS RAM DRAM Memory IC D41464 picture10PCS KM44C16104BS-45 16M x 4bit CMOS Dynamic RAM with Fast Page Mode
$32.0
10PCS KM44C16104BS-45 16M x 4bit CMOS Dynamic RAM with Fast Page Mode picture5pcs P8155H-2 Package:DIP-40,2048-Bit Static MOS RAM with I/O
$7.9
5pcs P8155H-2 Package:DIP-40,2048-Bit Static MOS RAM with I/O pictureUPD2114LC-3 - Static RAM Dynamic RAM Video RAM - DIP18
$5.0
UPD2114LC-3 - Static RAM Dynamic RAM  Video RAM - DIP18 pictureNEW RAM MOUNTS C SIZE SPOTLIGHT BASE RAM-236U
$9.99
NEW RAM MOUNTS C SIZE SPOTLIGHT BASE RAM-236U picture






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