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

COMPUTER BOARDS, INC CIO-DAS08/JR 12 BIT ANALOG INPUT BOARD 508-261-1123 9636
$29.98
COMPUTER BOARDS, INC CIO-DAS08/JR 12 BIT ANALOG INPUT BOARD 508-261-1123 9636 pictureMeasurement Computing PCI-DAS08 Analog Input PCI Board
$40.0
Measurement Computing PCI-DAS08 Analog Input PCI Board pictureComputer Analog Instrument Number Readout German 24 Volt FS066 National Lab Lot
$100.0
Computer Analog Instrument Number Readout German 24 Volt FS066 National Lab Lot  pictureMeasurement Computing PCI-DDA08/16 8-channel 16-bit analog output 48 digital I/O
$295.0
Measurement Computing PCI-DDA08/16 8-channel 16-bit analog output 48 digital I/O pictureMTL-6 Computers & Accessories Test Lead For Analog Megohmmeter Insulation Tester
$23.18
MTL-6 Computers & Accessories Test Lead For Analog Megohmmeter Insulation Tester picture






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