Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calendar Intent field Title/Description not working in Motorola Xoom Honeycomb 3.1 and Acer Iconia

I am developing an app that send datas to Android calendar via Intent. It works perfect with the default android calendar from 2.1 to 2.3.4 and also with 3rd party calendar like Jorte or Business Calender.

But with Honeycomb (Acer Iconia and Motorola Xoom) I am getting NO TITLE AND DESCRIPTION PASSED IN THE FIELD.

I have all the passed field filled, year, month, day, hours, minutes, but NO DESCRIPTION AND TITLE

GregorianCalendar cal = new GregorianCalendar();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
cal.set(Calendar.YEAR, Integer.parseInt(pv.getYear()));
cal.set(Calendar.MONTH, Integer.parseInt(pv.getMonth()));
cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(pv.getDay()));
cal.set(Calendar.HOUR_OF_DAY, Integer.parseInt(pv.getHours()));
cal.set(Calendar.MINUTE, Integer.parseInt(pv.getMinutes()));
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0); 

intent.putExtra("beginTime", cal.getTimeInMillis());
cal.add(Calendar.MINUTE, Integer.parseInt(eventTime));
intent.putExtra("endTime", cal.getTimeInMillis());
String description = pv.getDescription().trim();
intent.putExtra("title", title); // **NOT WORKING**
intent.putExtra("description", description); // **NOT WORKING**
startActivity(intent);

any idea? Thanks Sandro

EDIT: Looks like there is no TITLE and DESCRIPTION on the Intent with Honeycomb. The only way we are able to do that is using content provider, a totally different method.

like image 887
Sandro Avatar asked Aug 26 '11 21:08

Sandro


1 Answers

try used its... http://developer.android.com/guide/topics/providers/calendar-provider.html#intent-edit

like image 127
imperator_sp Avatar answered Nov 02 '22 22:11

imperator_sp