How to add event in background in google calendar? - android

I want to add event in Google Calendar. Flow is as follow.
First i select any one date from my custom calendar, and then on OnDateClickListener I save the event directly to the Google Calendar in background just add the text like "completed" so how is it possible?
Please help any demo any source code or any suggestion. How can i start with that?

Related

Android google calendar deleting future instances of recurring event

I'm trying to delete future instances of a google calendar recurring (repeated) event pro-grammatically using content resolver.
And to do this i have updated the rRule of the event , so for example if want to delete future instances of an event starting from date 11/11/2016
i edit the rRule string to look like so:
FREQ=DAILY;UNTIL=20161111;WKST=SU
However , when viewing google calendar application i find no changes and i find the event color only has changed to black color.
Some notes to keep in mind:
1- I'm using a third party library to so :
https://github.com/EverythingMe/easy-content-providers
CalendarProvider calendarProvider = new CalendarProvider(context);
Event event = calendarProvider.getEvent(eventId);
event.rRule = "FREQ=DAILY;UNTIL=20161111;WKST=SU";
calendarProvider.update(event);
and all functionalities in this library seem to work fine.
2- While reading pro-grammatically recurring events that have a specific UNTIL date in it's rRule , i have realized that also a field in the google event called "lastDate" is updated with one hour later after the UNTIL value ,so do i have to update also this field while updating the UNTIL value in the rRule?
The problem was with the library ,
calendarProvider.update(event);
does not seems to work with all event fields!

Adding events to caldroid

am new to android. am creating a calendar using cal-droid library. I have set of data`s from the server, and I need to highlight those event dates in the calendar and also upon taping on a particular date, display the list of events for that date in list view below calendar view. Could any one please tell me any references or some sample codes for the same using Cal-droid.
use predefine method in caldroid Lib make sure you are supplying correct Format
dialogCaldroidFragment.setSelectedDates(formatter.parse("yourfromdate"),
formatter.parse("yourtodate"));
or use dialogCaldroidFragment.setBackgroundResourceForDates(formatter.parse("yourfromdate"));
link : https://github.com/roomorama/Caldroid/issues/34

How to create events in calender Android

Iam trying to create a calender by following the given tutorial http://w2davids.wordpress.com/android-simple-calendar/?blogsub=confirming#subscribe-blog
but i want to add some modification to this code.
my exact need is ,
I have a string array , it contain some dates. i want to mark these dates into my calender
and when i click a particular date ,it will become marked, and when i click again it is unmarked, also i want to get the marked dates.
how this is possible. I am very new in android development... this is my first question in stack overflow .. please encourage me... please give me a solution..

Android - Block editable calendar event

I guess not, but just for trying. It is possible add an event programmatically and this event can't be edited anymore? The user just can delete the event, but he can't edit it, for example, he can't edit the date of event.
I think it's possible, but it's going to be complex. You should look at the Calendar Provider API and you may wish to see how the Last.fm app does things.
try to put the content value CalendarContract.Events.IS_ORGANIZER to true for the event and CalendarContract.Calendars.OWNER_ACCOUNT with the email of the user account when you create the calendar.

How to get android calendar event when I have event ID

Is it possible to get calendar event when I have specific ID or it is necessary to read all events and compare to my ID?
Thank you
I think is better to find it based on information of the event(title,description),because when you want to edit a speceific event meanwhile the user can delete himself your event,and create another event which might have the same ID as yours.So you will get the wrong event to edit.
So i think is safer to find your's choice event based to title or description ...
For example if you want to delete an event(android 2.2 example):
getContentResolver().delete(Uri.parse("content://com.android.calendar/events"), "title=? and description=?", new String[]{"The title of the event", "Description of the event"});

Categories

Resources