I made an android application that stores events in the calendar of a user's smartphone. For example, through my app, the user creates a specific event like a conference meeting and then clicks on the button "Add to Calendar". My app then sends the user to the Calendar application to perform the desired operation (adding the event to the calendar). After they're done, they're returned to my app.
Now, I want to retrieve the specific event from the calendar created through my app.
I was thinking about getting the EVENT_ID of each event as the user adds it to the calendar and saving it in a file. I then retrieve the events from the calendar using the ids previously saved in the file. I don't know if this is good practice.
There is also the possibility that the user deletes an event through his calendar application.
So, how can I retrieve the specific events created by my application from a calendar?
Thanks.
Related
In the Android calendar app one can activate certain calendars, like holidays or birthdays. In the case of holidays I suppose the data comes from Google, in the case of birthdays the data comes from my contacts.
I would like my app to provide such calendar data. The data would be generated by my app, the Calendar app would simply display it. I would like my app to show up among the aforementioned list of calendars in the Calendar app, like holidays and birthdays, where the user may activate it and choose a color.
To make things clear: I don't want my app to access the Calendar app, but the other way around: the Calendar app would access the calendar data provided by my app.
Is this possible in the way I describe? What API do I have to implement?
If this is not possible this way, is there another way that comes close to what I'm describing?
Or is the only way to provide data to the Calendar to ask write permission for the Calendar and add events?
We are using Microsoft Graph API for creating events in the outlook calendar using Android.
The event is permanently removed from the outlook calendar when the attendee declined that event.
So we need to regenerate that event to that particular attendee's calendar without updating any other changes by the organizer (just add another attendee).
For example,
Abc is Organizer
A1 is Attendees
now A1 declined that event. Then the organizer updates the event by adding only another attendee(A2) (Not made any other changes like summary, dates, timezone, location, etc...) just added another attendee.
In this case, Microsoft(Outlook) does not recreate the event on that specific attendee's calendar.
One solution is that we first removed that specific attendee by updating the event and then again add that attendee. so the event regenerates to that specific attendee's outlook calendar.
but it might become a lengthy process.
so Are there any other ways to recreate an event in a specific attendee calendar who previously declined the event?
Are there any other ways to recreate an event in a specific attendee calendar who previously declined the event?
No, you need to send a new meeting request by adding an attendee anew.
Was looking at the Calendar Provider documentation because I need to add events to the google calendar.
My app will be able to list the events on the calendar or create new events.
Is it possible to create a custom event, that is, it signals that it was created by my app so that, after inserting the event on the google calendar, on my app, I can only list the events that were created by my app? Is there any flag that signals the event creation app/owner, etc?
You can use ExtendedProperties. Here is docmunetation. This table is used by sync adapters to add extra information. However you can insert a name/value pair in this table such as a boolean when inserting events. You will use this field when you query events to find out event are from your app or not.
I have created a custom Calendar in android, kept in sync with a remote server via SyncAdapter using a custom Account with a custom AccountType.
The sync works fine and my app on the device has an activity that allows the user to insert edit and delete events in my custom calendar.
The only "problem" is the usability,
since the user wants to use the standard calendar app present on the device, because he's used to it's interface, etc.
Actually when I open my events from the standard calendar app, I can see the details of the event but there is no edit or delete function available.
In order to edit such appointments the user must close the standard calendar app, open my app (which should provide a list of the events and then edit them.)
Is it possible to let the system know that there is my App on the device with a specific Activity that is able to perform operations like edit or delete on the events belonging to my custom calendar which has a specific account type ?
Any Idea on how to achieve this?
Thanks in advance.
i have an application in which i need to sync the events that i get from an xml to the default calendar provided in the users phone.
for the above i have referred this tutorial.But over here the first it is required to get the id and name of all the available calendars in the users phone... i don't know the id and name of the default calendar in the users phone....which calendar should i use to put events in?
i am not putting the code here as the code is present in the link given.
thank you in advance.
You can't know ahead of time. There is no system setting for the default calendar. You must account for this in your application by allowing the user to select the calendar or coming up with your own way of determining the "default".
Be careful not to rely on the persistence of any calendar because if they are Google calendars they will come and go with corresponding changes in the cloud.