Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 62
Registered: ‎07-14-2008
My Device: Not Specified
Accepted Solution

valid ToDo.PRIORITY values

According to the API doc v4.5.0 and older the values of the priority field in a ToDo object are:

 

"A value of 0 indicates the highest priority level. A value of 1 indicates normal priority. A value of 2 indicates the lowest priority level."

 

But testing with the components pack 4.5 and it's default simulator I get values:

HIGH = 1

NORMAL = 5

LOW = 9

 

A little bit confused I looked in the API doc v 4.7.0 and found this:

 

"... The priority is a value from zero to nine. Zero specifies an undefined priority, one specifies the highest priority and nine the lowest priority. ..."

 

That would explain it, but can I be sure that 1-5-9 is valid for all device software versions 4.5.0 and higher?

What would the BB's Task application show if i create a task manually and take other priorities between 1 and 9?

Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: valid ToDo.PRIORITY values

If you want to support all the devices from version 4.5 and higher then use priorities as 0-High, 1-normal and 2-low. If you just need for strom which is from version 4.7 then you can use priorities from 1 to 9 where 1 as highest and then decreasing.

 

 


Press the kudos button to thank the user who helped you.

If your problem was get solved then please mark the thread as "Accepted solution".

 

 

 

Deepesh Gupta
Developer
Posts: 62
Registered: ‎07-14-2008
My Device: Not Specified

Re: valid ToDo.PRIORITY values

[ Edited ]

As I wrote in my post I'm getting 1-5-9 on a 4.5 simulator so how should I use 0-1-2?

Message Edited by Ivanov on 03-18-2009 12:56 PM
BlackBerry Development Advisor
Posts: 15,809
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: valid ToDo.PRIORITY values

[ Edited ]

The documentation in the 4.5.0 and lower JavaDocs is incorrect.  This has been updated in version 4.6.0+.

 

Here is are a chart on how it works.

 

PRIORITY Specified to setInt()/addInt()

PRIORITY returned from getInt()PRIORITY in the Tasks Application
0, 4, 5, 65Normal
1, 2, 31High
7, 8, 99Low
Message Edited by MSohm on 03-18-2009 10:13 AM
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 62
Registered: ‎07-14-2008
My Device: Not Specified

Re: valid ToDo.PRIORITY values

Thanks for the clarification, Mark.
Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: valid ToDo.PRIORITY values

[ Edited ]

@ MSohm

 

If getInt() only returns one of the values from (5, 1 & 9), then what's the purpose behind setting 10 different values?

 

Quotes from Deepesh:

If you just need for strom which is from version 4.7 then you can use priorities from 1 to 9 where 1 as highest and then decreasing.

 

Does it only behaves such like for the earlier version to 4.7 only? 

 

Thanks

Message Edited by baskaraninfo on 03-26-2009 01:22 AM

Use Search. "Accept Solution" if the problem gets resolved.
Highlighted
BlackBerry Development Advisor
Posts: 15,809
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: valid ToDo.PRIORITY values

The JSR75 PIM API specifies the range of values that are valid for ToDo.PRIORITY fields.  The range of 0-9 was not chosen by RIM.  The implementation of Tasks on a BlackBerry handheld supports 3 distinct priorities.  They were mapped into the 0-9 range as identified in the table given earlier in this discussion. 

 

Here is an excerpt from the javadocs for ToDo.PRIORITY: “It is not guaranteed that this value remains unchanged after setting the value and/or persistence of the ToDo item due to underlying native database priority support and mappings to the native priority values.” 

 

This has not changed in version 4.7.0.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.