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

BRAND NEW ROYAL ENFIELD BSA,AJS AMMETER BLACK FACED 42mm 8 AMP
$12.99
BRAND NEW ROYAL ENFIELD BSA,AJS AMMETER BLACK FACED 42mm 8 AMP picture BRAND NEW AMMETER & VINTAGE HEADLIGHT SWITCH RUBBER RING #140248
$4.98
 BRAND NEW AMMETER & VINTAGE HEADLIGHT SWITCH RUBBER RING #140248  pictureROYAL ENFIELD EARLY MODELS BRAND NEW 8 AMP. AMMETER C/W 6 V BULB
$21.99
ROYAL ENFIELD EARLY MODELS BRAND NEW 8 AMP. AMMETER C/W 6 V BULB pictureROYAL ENFIELD EARLY MODELS BRAND NEW 8 AMP. AMMETER C/W 6 V BULB HIGH QUALITY
$21.99
ROYAL ENFIELD EARLY MODELS BRAND NEW 8 AMP. AMMETER C/W 6 V BULB HIGH QUALITY pictureHQ Bid 6V-8A Ammeter C/W Bulb For Royal Enfield
$16.99
HQ Bid 6V-8A Ammeter C/W Bulb For Royal Enfield picture






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