3

By Stack Overflow question How to add a calendar event on an Android device with a given date? I set the calendar event, but how do I know that the user has set the calendar event or not set it?

Community
  • 1
  • 1
ranjit patel
  • 757
  • 1
  • 9
  • 21

1 Answers1

0

Do you mean you want the user to pick a date? You can use the date picker dialog and a listener. Here is a tutorial which explains you how to do it: http://developer.android.com/resources/tutorials/views/hello-datepicker.html

vallllll
  • 2,731
  • 6
  • 43
  • 77
  • 1
    i want to know that user press the save button calendar event activity or cancel button for not saving the event.means Status of the event,successfully set or not. – ranjit patel Aug 24 '11 at 08:05
  • Then you can use StartActivityForResult as shown in this link:http://developer.android.com/reference/android/app/Activity.html#StartingActivities see the section Starting Activities and Getting Results – vallllll Aug 24 '11 at 08:36
  • i have test the application by using startActivityForResult,but how we know user press save or cancel.on pressing of save also onActivityResult() is executing and by pressing cancel also. – ranjit patel Aug 24 '11 at 09:19