Calendar Intent字段标题/描述在Motorola Xoom Honeycomb 3.1和Acer Iconia中不起作用

时间:2011-08-26 21:25:35

标签: android android-3.0-honeycomb

我正在开发一款通过Intent将数据发送到Android日历的应用。 它适用于2.1至2.3.4的默认安卓日历,以及Jorte或Business Calender等第三方日历。

但是使用Honeycomb(Acer Iconia和摩托罗拉Xoom),我在领域中没有得到任何标题和描述。

我已经填写了所有通过的字段,年,月,日,小时,分钟,但没有描述和标题

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);

任何想法? 谢谢 桑德罗

编辑: 看起来在与Honeycomb的Intent上没有TITLE和DESCRIPTION。 我们能够做到这一点的唯一方法是使用内容提供商,这是一种完全不同的方法。