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

EXCEL Digital Multimeter XL830L Volt Meter Ammeter Ohmmeter Tester Yellow HYSG
$7.19
EXCEL Digital Multimeter XL830L Volt Meter Ammeter Ohmmeter Tester Yellow HYSG picture3x 100A AC Digital Power Meter KWh Time Watt Monitor Voltmeter Ammeter with CT
$36.1
3x 100A AC Digital Power Meter KWh Time Watt Monitor Voltmeter Ammeter with CT pictureuxcell® DMiotech 85C1-A Analog Current Panel Meter DC 30A Ammeter Ampere Tester
$11.6
uxcell® DMiotech 85C1-A Analog Current Panel Meter DC 30A Ammeter Ampere Tester pictureYeeco Digital Multimeter LED Ammeter Voltmeter Dual Display 7 Modes USB 2.0 H...
$12.02
Yeeco Digital Multimeter LED Ammeter Voltmeter Dual Display 7 Modes USB 2.0 H... pictureBrand New White Face 8 Ampere Ammeter For Royal Enfield
$6.56
Brand New White Face 8 Ampere Ammeter  For Royal Enfield picture






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