我正在开发一个应用程序,通过意向发送数据到Android日历。它适用于默认的android日历,从2.1到2.3.4,也适用于Jorte或Business Calender等第三方日历。
但对于Honeycomb (宏碁、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);
有什么想法吗?谢谢桑德罗
编辑:看起来蜂巢的意图上没有标题和描述。我们能够做到这一点的唯一方法是使用内容提供商,这是一种完全不同的方法。
发布于 2012-09-11 22:24:43
https://stackoverflow.com/questions/7210705
复制相似问题