日历意图字段标题/描述在 Motorola Xoom Honeycomb 3.1 和 Acer Iconia 中不起作用
我正在开发一个通过 Intent 将数据发送到 Android 日历的应用程序。 它与 2.1 到 2.3.4 的默认 Android 日历以及 Jorte 或 Business Calender 等第三方日历完美配合。
但对于 Honeycomb(Acer Iconia 和 Motorola 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);
有什么想法吗? 谢谢 桑德罗
编辑: 看起来蜂窝意图上没有标题和描述。 我们能够做到这一点的唯一方法是使用内容提供商,这是一种完全不同的方法。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用它的...
http://developer.android.com/guide/topics /providers/calendar-provider.html#intent-edit
try used its...
http://developer.android.com/guide/topics/providers/calendar-provider.html#intent-edit