How can I extend Calendar on Android? - android

I mean, is there any way to
add more functionality
add/remove events
synchronize with other then Google calendars/formats (authorized)

There is a content provider available for Calendar entries: android.provider.Calendar.CONTENT_URI (see brief documentation here).
Though, I'd consider using the Google Calendar Data API. You should be able to authenticate the user using AccountManager#getAuthToken and edit calendar entries in very rich and well-documented ways.

Related

How to create a Reminder (not Event) in Calendar programmatically in Android?

I want to create a reminder in Google Calendar from my Android app.
Creating events is well-documented, there’s a Calendar content provider for that. However there seems to be no content provider contract for these standalone reminders (not to be confused with event reminders, aka event notifications).
In the app, "Reminders" is listed as a separate calendar along "Events", but when I query the CalendarContract.Calendars table, it’s not on the list. Querying the CalendarContract.Events also doesn’t list reminder events. So I guess they’re stored somehow differently, yet I cannot find any info on that.
Is there a way to create these reminders programmatically?
Okay, after some more looking, answering my own question.
There’s no way to do this. Despite those reminders being a cross-application feature, there's no API to access them.
There's a feature request for this.
My question basically duplicates questions: [1] [2], I didn't find them because they mentioned other apps, which share the same reminders with Calendar.

Can I access to this Screen if I use Google's Calendar API?

I'm trying to save events from my app in the Google's calendar. Now, I'm using an intent to launch this preview screen (with the fields already filled in) in case the user wants to modify any field. I want to use the Google's calendar API, I have read the documentation and I have not found the way that this screen appears. Can someone give me a hand? Thank you.
The Google Calendar API is a rest api. It returns data in raw json format. It is up to the developer to format the data and display it as they would like.
I have read the documentation and I have not found the way that this screen appears.
The Google Calendar does not have access to any screens it only has access to data. You will have to create your own screens and extract the data from the Api.
Most of the data in that screen can be found in the event methods found in this section of the documentation events overview

Calendar display in Android App only through Calendar View?

I would like to display a calendar in an android app. Based on some research, I found that we can use the CalendarView widget to display a calendar. We cannot create events, attendees or other features using the CalendarView, correct me if I am wrong. The other option is to use the native in built calendar using Intents.
Is there any other way to display a calendar easily in an Android app easily without the above 2 methods and still be able to create events, attendees or other features.
Can CalendarProvider be used create a calendar display. I know it can be used to create events, attendees, reminders etc...
Can CalenderProvider be used in conjunction with CalendarView?
If CalendarProvider cannot be used in conjunction with CalendarView or any other easy way, should we build a calendar from scratch?
Thank you in advance!!!
Based on some research, I found that we can use the CalendarView widget to display a calendar.
You can use CalendarView to allow the user to pick a date.
We cannot create events, attendees or other features using the CalendarView, correct me if I am wrong
CalendarView is a widget. Its job is not to "create events, attendees" — similarly, it is not the job of EditText to create Wikipedia pages. The job of CalendarView is to let the user pick a date using a calendar-style visual representation.
Is there any other way to display a calendar easily in an Android app easily without the above 2 methods and still be able to create events, attendees or other features
You are certainly welcome to see if there is an existing library that has your desired feature set.
Can CalendarProvider be used create a calendar display
Not directly. This is akin to asking "can I use an Excel spreadsheet to create a calendar display?" CalendarProvider is a data store. It is not a visual representation of an event calendar.
Can CalenderProvider be used in conjunction with CalendarView?
Not in the way that you are thinking. CalendarView is a way to allow the user to pick a date. It is not a way to show the user information about particular dates (e.g., appointments or other events).
should we build a calendar from scratch?
That is up to you.

How to implement CalenderView in Android

I am new at android this, so this might sound a bit confusing..
i am making an app that requires to have calendars showing events in week, day and month views (like google calendar). I have implemented this is a testing version but i want to change the implementation to make it more flexible. currently the event are stored in database and are edited and used in various activities in the app. Can i have android manage the events in it's calendar? but i would still need to be able to manipulate it from the app and store extra info other than the time and date and description. These extra info will be used for calculations. We also need to have a calendar in the app. Can we retrieve the events specific to the app for doing all this?
This tutorial might be of help.

Calendar Backup and Restore

I am building a application which takes a backup of calendar & restores it on demand.
How can I achieve this in Android? Are there any api's which imports/exports contacts just like for Contacts ?
Once you've got all the data you would like to put back into the calendar, you can use the google-api-java-client to access the users google calendar and put your events in it. Here's an example of using it in android.

Categories

Resources