How to implement CalenderView in Android - 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.

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.

How to get reminders list programmatically?

I created an Android app that read all the events of the calendar, it's work fine but I can't read the list of reminders: the simplified event in the Google calendar identified by this icon (knot on the finger)
Google Calendar Reminder
Someone can tell me how can I read this type of event or where can I find a tutorial or a guide where this is explained?
If you want to fetch list of reminders, use Events.list. It returns events and the accompanying reminders.
Default reminders
Default reminders are also returned when
doing an Events list query.
I discovered that the reminders aren't only on calendar but are in different Google app (keep for example).
Unfortunately it's not possible to access a this kind of data.
This the link of the answer in Stackoverflow: How to read reminders in google calendars
According to OferR The Reminders data is held in a database and accessible by the 'com.google.android.gms.reminders.provider.RemindersProvider' content provider.
So, the provider is not exported and therefore is not accessible to third party apps.

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.

Looking for something like DatePickerDialog but with a recurrence function

I'm new to Android development, and I am trying to build an app that has a task list with items that recur at a user specified frequency. I would like the user to select the first due date for the task, and also specify the frequency for the recurrence, similar to how you can do this for events in Google Calendar (I am currently using a DatePickerDialog to allow the user to select a due date; I am just missing the recurrence piece). However, I do not want to put events in the calendar using the calendar API. I have searched StackOverflow and have come up empty; I see plenty on the calendar API but don't believe this is what I am looking for (since I don't want to put anything in the user's calendar); is this a correct assumption? Is there a class that I have missed that handles recurring dates? Or, is there a simpler way to go about this?
I was looking for pretty much the same thing and I ended up using BetterPickers library. There are various dialogs you can use and one of them is also a RecurrencePickerDialog which looks a lot like the one in Google Calendar app.

Can I create or delete an Android calendar from a custom application?

I'm trying to make an application that manages the internal Android calendar, but I want to know if I can delete or create new calendars. (I know about the calendar's events but not about the calendars.) Can you help me with examples or documentation?
Some code on how to read calendars and their events here. You should also be able to write to the Calendar ContentProvider.
But remember there is no official Calendar API. Any code working today or on a certain device can break in the future or on other devices.
Have a look at this question

Categories

Resources