03-18-2009 07:10 AM
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?
Solved! Go to Solution.
03-18-2009 07:51 AM
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".
03-18-2009 07:55 AM - edited 03-18-2009 07:56 AM
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?
03-18-2009 09:39 AM - edited 03-18-2009 10:13 AM
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, 6||5||Normal|
|1, 2, 3||1||High|
|7, 8, 9||9||Low|
03-26-2009 01:19 AM - edited 03-26-2009 01:22 AM
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?
03-26-2009 10:28 AM
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.