BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-23-2009, 05:19 PM   #1 (permalink)
New Member
 
Join Date: Oct 2009
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How to schedule different Task with the same timer

Please Login to Remove!

I have a brief question here, I tried to assign multipleTimerTasks to a single timer, Basically what I was doing is I was going to assign 2TimerTasks in two different classes to a single Timer, but It just crashed the application after I did that. I was wondering if I am allowed to do that? and how? Thanks a lot!!
Offline  
Old 10-26-2009, 07:48 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2007
Location: India
Model: 8100
Carrier: Airtel
Posts: 64
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to schedule different Task with the same timer

First check if timer is not null.. that means one task is already assigned.

While assigning firsttask keep track of the time (by keeping one global static variable which can be used all over the application in any class).

Then when you to assign third task compare the time with this one and then assign minimum to timer.

when this first task start then assign next task to the timer..

if you want to do this for more than 2 tasks.. keep the task list in persisatant storage or RMS. then after finishing one read the storage and assign the task to timer. after starting that task remove it from the storage.

this will work.. I have done same in my application.
__________________
Crazy for BlackBerry
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

1Pcs Lqfp64 128K Fla Stmicroelectronics Stm8s207rbt6 6K Ram 8-Bit Mcu Ic New W
$1.68
1Pcs Lqfp64 128K Fla Stmicroelectronics Stm8s207rbt6 6K Ram 8-Bit Mcu Ic New W picture02 03 04 05 DODGE RAM 1500 2500 3500 CLOTH FRONT POWER SEAT SEATS CONSOLE
$499.99
02 03 04 05 DODGE RAM 1500 2500 3500 CLOTH FRONT POWER SEAT SEATS CONSOLE picture1pcs NEW HYNIX H5GQ2H24MFR-T2C Video ram
$2.9
1pcs NEW HYNIX H5GQ2H24MFR-T2C Video ram  picture**NEW** RAM ELECTRONIC CORP CDS-5 Dryer IGNITOR ,IGNITION CONTROL CDS-5
$30.99
**NEW** RAM ELECTRONIC CORP CDS-5 Dryer IGNITOR ,IGNITION CONTROL CDS-5 picture3 pcs CY7C1019CV 33-12VC CYPRESS 128K x 8 Static RAM
$8.9
3 pcs CY7C1019CV 33-12VC CYPRESS 128K x 8 Static RAM picture






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