android - 无法理解android中的以下代码?

标签 android android-intent

Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.getTimeInMillis());
intent.putExtra("allDay", false);
intent.putExtra("rrule", "FREQ=DAILY");
intent.putExtra("endTime", cal.getTimeInMillis()+60*60*1000);
intent.putExtra("title", "A Test Event from android app");

以上是我针对以下问题引用的代码:

  • 从哪里获取 setType 方法的值?像这里一样,他们使用了“vnd.android.cursor.item/event”。
  • 对于进入 putExtra 字段的值...就像它们在这里使用的 rruleendtime 等。如何知道可以在这里使用哪些字符串?
  • 在上面的代码中,字段rrule代表什么?

提前致谢。

最佳答案

如我所见,这段代码与日历事件创建有关。

rrule 是一个重复规则,参见http://www.ietf.org/rfc/rfc2445.txt

编辑 似乎没有相关文档,唯一的方法是检查平台代码。

关于android - 无法理解android中的以下代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5987358/

相关文章:

android - Android 2.3.3 适合使用哪种推送通知方法?

java - onPostExecute() 之后新 Intent 未开始

java - 使用 Intent 设置 ImageView 颜色(另一个 Activity )

Android 在应用程序关闭时禁用 BroadcastReceiver

java - UnsupportedOperationException 打开相机时出错 android

android - OpenCV 在 map 上检测六边形网格

android - 无法与任何提供的主机建立套接字

java - 无法解析 onActivityResult 方法

java - Android:HTML 附件未通过电子邮件发送

android - 单击回调后的新 Intent