i need to add some event in calendar,example In Aug-15 i need to add "independence celebration ".one i click Aug-15 have to show "independence celebration ",please help me i am in trouble
Asked
Active
Viewed 217 times
0
-
Yes dear you are in trouble but please post the code that you have tried yet. – Paresh Mayani Nov 09 '11 at 11:42
-
Please go through this link first because there are many questions for the same exits on SO: http://stackoverflow.com/search?q=android+calendar+event – Paresh Mayani Nov 09 '11 at 11:43
-
possible duplicate of [Android create calendar event](http://stackoverflow.com/questions/6094243/android-create-calendar-event) – Paresh Mayani Nov 09 '11 at 11:45
1 Answers
0
There are a lot of questions about same calender events.You should have searched the forum at least once before asking it but since you asked I'm giving you a code which you can understand and modify according to your needs.
Calendar cal = Calendar.getInstance();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.getTimeInMillis());
intent.putExtra("allDay", true);
intent.putExtra("rrule", "FREQ=YEARLY");
intent.putExtra("endTime", cal.getTimeInMillis()+60*60*1000);
intent.putExtra("title", "A Test Event from android app");
startActivity(intent);
If you find any difficulty then you can refer to these previously asked questions:

Community
- 1
- 1

dark_shadow
- 3,503
- 11
- 56
- 81