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

Android™ Development

Reply
New Developer
Posts: 11
Registered: ‎05-05-2009
My Device: Not Specified

Re: Blackberry Calendar Event Creation

Thanks for your reply. It finally works.

Keep in mind that you need the full date and time. If you don't pass even the seconds, it will fail.

Here is some working code;

 

intent.setAction(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
final SimpleDateFormat std = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
// sdf.setTimeZone(TimeZone.getTimeZone("UTC")); // uncomment if needed
intent.putExtra("dtstart", std.format(startMillis));
intent.putExtra("dtend", std.format(endMillis));
intent.putExtra("title", "");
intent.putExtra("eventLocation", "");
context.startActivity(intent);

 

Good luck,

Lionscribe