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
New Developer
skalluraya
Posts: 47
Registered: ‎10-19-2009
My Device: Not Specified

update the REMINDER

Hi All,

I have a problem. In my application i have to give a field which accepts a date and want to set a reminder at that date. I have used following codes works fine and inserts a reminder. Now what is the when i am edit details of the record for which i have inserted a reminder, the user should be able to edit the reminder also. I question is how to i get a ID of the inserted Reminder so that when user comes to edit page i would update the respective ID of the reminder.

 

Thanks in advance

skaluraya

 

 

BlackBerryToDoList todoList = (BlackBerryToDoList) PIM.getInstance().openPIMList(PIM.TODO_LIST, PIM.WRITE_ONLY);
ToDo todoItem = todoList.createToDo();
todoItem.addString(ToDo.UID, 0, recordData.getUID()+"");
todoItem.addString(ToDo.SUMMARY, 0, name);
todoItem.addString(ToDo.NOTE, 0, note);
todoItem.addDate(BlackBerryToDo.REMINDER, BlackBerryToDo.ATTR_NONE, (new Date()).getTime());
// todoItem.addDate(ToDo.DUE, ToDo.ATTR_NONE, _startTime.getDate());
todoItem.commit();
todoList = (BlackBerryToDoList) PIM.getInstance().openPIMList(PIM.TODO_LIST, PIM.READ_ONLY);
System.out.println("onSaveToDo:-->"+todoList.getByUID(recordData.getUID()+""));

 

 

BlackBerryToDoList todoList = (BlackBerryToDoList) PIM.getInstance().openPIMList(PIM.TODO_LIST, PIM.WRITE_ONLY);
			ToDo todoItem = todoList.createToDo();
			todoItem.addString(ToDo.SUMMARY, 0, myname);
			todoItem.addString(ToDo.NOTE, 0, mynote);
			todoItem.addDate(BlackBerryToDo.REMINDER, BlackBerryToDo.ATTR_NONE, (new Date()).getTime());
			todoItem.commit();
						

 

New Developer
skalluraya
Posts: 47
Registered: ‎10-19-2009
My Device: Not Specified

Re: update the REMINDER

I could fix the Issue. Now i have an issue, I want my app to be supported to 4.5 also. but BlackBerryToDoList is supported only after 4.6 and above. is there any way i can generate same build for all the version. i.e put some condition so that for 4.5 the reminder feature would not work and for 4.6 and above it would work....

 

 

With Regards]

Shrikanth Kalluraya

BlackBerry Development Advisor
MSohm
Posts: 14,849
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: update the REMINDER

BlackBerryToDoList was added in version 4.6.0 of BlackBerry handheld software.  It is not possible to make use of this class in lower versions.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
BB-Dude
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: update the REMINDER

You can use the preprocessor to handle your code where the 4.5 code will add a reminder but any version after that will handle the case. Search for preprocessor.