android - 日历 Intent 字段标题/描述在摩托罗拉 Xoom Honeycomb 3.1 和 Acer Iconia 中不起作用

标签 android android-3.0-honeycomb

我正在开发一个通过 Intent 将数据发送到 Android 日历的应用程序。 它与从 2.1 到 2.3.4 的默认 android 日历以及 Jorte 或 Business Calender 等第 3 方日历完美搭配。

但是对于 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);

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

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

最佳答案

关于android - 日历 Intent 字段标题/描述在摩托罗拉 Xoom Honeycomb 3.1 和 Acer Iconia 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7210705/

相关文章:

android - 在 Android 手机上登录

android - android.view.ViewConfiguration 中的一些方法似乎在 Android 5.0.1 中消失了

android - 如何将首选项 Activity 添加到语言和键盘?

android-3.0-honeycomb - 使android 2.2版本的应用兼容android 3.0

单击项目时的Android操作栏自定义下拉 View

安卓蜂窝 : Off-center button text - unable to center

android - SoundCloud getCommentsFromTrack

android - 各种插件(例如 Kotlin)被标记为与 Android Studio 3.4 Beta 1 不兼容

android - 使用 setDefaultUncaughtExceptionHandler (reportDropResult) 捕获未处理的异常时线程卡住

android - Android Honeycomb 有文件大小限制吗?