首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >日历意图字段标题/描述在Motorola Xoom Honeycomb 3.1和Acer Iconia中不起作用

日历意图字段标题/描述在Motorola Xoom Honeycomb 3.1和Acer Iconia中不起作用
EN

Stack Overflow用户
提问于 2011-08-27 05:25:35
回答 1查看 827关注 0票数 16

我正在开发一个应用程序,通过意向发送数据到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);

有什么想法吗?谢谢桑德罗

编辑:看起来蜂巢的意图上没有标题和描述。我们能够做到这一点的唯一方法是使用内容提供商,这是一种完全不同的方法。

EN

回答 1

Stack Overflow用户

发布于 2012-09-11 22:24:43

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7210705

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档