Android的创建日历事件 [英] Android create calendar event

查看:130
本文介绍了Android的创建日历事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为Android应用程序创建多个日历事件,使用此<一个href="http://stackoverflow.com/questions/3721963/how-to-add-calendar-events-in-android/4336183#4336183">question我能创造一个事件。

I need to create multiple calendar event for Android application, Using this question I was able to create single event.

是否有创建多个日历事件的任何例子或指导?

Is there any example or guide for create multiple calender events?

感谢你, Chandana

Thank You, Chandana

推荐答案

将这些函数中的

喜欢

public void calenderevent(Calendar begintime, Calendar endtime){

    Intent intent = new Intent(Intent.ACTION_EDIT);
    intent.setType("vnd.android.cursor.item/event");
    intent.putExtra("beginTime", begintime.getTimeInMillis());
    intent.putExtra("allDay", true);
    intent.putExtra("rrule", "FREQ=YEARLY");
    intent.putExtra("endTime", endtime.getTimeInMillis()+60*60*1000);
    intent.putExtra("title", "A Test Event from android app");
    startActivity(intent);
}

这篇关于Android的创建日历事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆