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

Vintage Fruit Wine Cider Press Juice Maker Grapes Crusher Harvest Apple Antique
$142.98
Vintage Fruit Wine Cider Press Juice Maker Grapes Crusher Harvest Apple Antique pictureVTG APPLE COMPUTER MEAD ZIPPERED ORGANIZER CASE
$19.99
VTG APPLE COMPUTER MEAD ZIPPERED ORGANIZER CASE  pictureVintage EDM 926 ELECTROHOME monitor Apple II
$199.0
Vintage  EDM 926 ELECTROHOME monitor Apple II   picture Vintage OEM Apple Design Powered Speakers M2497 USED WORKING
$39.99
 Vintage OEM Apple Design Powered Speakers M2497 USED WORKING pictureVintage Letterpress Print Type Ornament "An Apple A Day Bugs The A.M.A." Adcut
$9.5
Vintage Letterpress Print Type Ornament






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