Questions tagged [android-calendar]

The Calendar Provider is a repository for a user's calendar events. The Calendar Provider API allows you to perform query, insert, update, and delete operations on calendars, events, attendees, reminders, and so on.

Calendar Provider Guide

995 questions
46
votes
2 answers

java.lang.IllegalArgumentException: Bad class: class java.util.GregorianCalendar

I received this exception while using GregorianCalendar java.lang.IllegalArgumentException: Bad class: class java.util.GregorianCalendar Who know how to fix, Please help me. p/s : I used the following code : Calendar someDate =…
Huy Tower
  • 7,769
  • 16
  • 61
  • 86
44
votes
7 answers

Is there any way to dynamically change an app icon like Calendar app does?

I wanna create an Android application, and I want to dynamically and automatically update the app icon similarly to how the calendar icon updates on a user's homescreen. The calendar changes its icon for each day showing day of month's number. There…
Lennon Spirlandelli
  • 3,131
  • 5
  • 26
  • 51
39
votes
3 answers

Calender.getInstance() gives error in Android Studio

I'm trying to pop-open a DatePicker dialogue box when my EditText is clicked. The problem is, when I try to instantiate my Calender object with Calender.getInstance() the creepy-red-underline appears below getInstance(). Calender myCalender =…
Arsal
  • 565
  • 2
  • 8
  • 17
35
votes
10 answers

how to show milliseconds in days:hours:min:seconds

This is what I have at the moment Seconds = (60 - timeInMilliSeconds / 1000 % 60); Minutes = (60 - ((timeInMilliSeconds / 1000) / 60) %60); which I feel is correct. for hours and days should it be like - Hours = ((((timeInMilliSeconds / 1000) /…
Akshat Agarwal
  • 2,837
  • 5
  • 29
  • 49
33
votes
1 answer

List events for specific day in Android 4+ (ALL_DAY issue)

I'm attempting to get all events happening on selected day in Android 4+. As far as I understand, CalendarContract.Instances is the easiest way of getting events, since it handles both recurring events and single time events. However, I have some…
31
votes
7 answers

How to add calendar events to default calendar, silently without Intent, in android 4?

I want to add calendar events programmatically (directly) in android 4+. Is it this possible to be tested on emulator? I don't own an android phone. Some sample code would be appreciated. I read Calendar Provider of android developers but I'm…
oikonomopo
  • 4,025
  • 7
  • 44
  • 73
28
votes
5 answers

Android CalendarView for Showing Events

I want to show a calendar with events using different colors on the date similar to default Calendar application. But I don't see any such API on the default calendar view. Can anyone please direct me on right direction how to proceed with this?…
Karthik Andhamil
  • 848
  • 1
  • 13
  • 22
27
votes
3 answers

Deleting events from Calendar not being deleted

I am trying to make my App add reminders to the user's Calendar. The code searches for the title and start date to check if the event already exists in the Calendar before adding it (so as not to have duplicates). My problem is that: if I remove the…
Mohamed_AbdAllah
  • 5,311
  • 3
  • 28
  • 47
24
votes
5 answers

Why does the datepicker add a calendar in my view?

I am starting to learn how to develop on Android. It is pretty straightforward but I'm facing an issue I did not find any mention anywhere... I have a view :
Guigui
  • 1,105
  • 1
  • 11
  • 21
21
votes
1 answer

Call requires API level 24(current minimum is 12):android.icu.util.calendar

I am making a simple alarm app. Wherever I am using Calendar class it's showing an error same as title. Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.set(Calendar.HOUR_OF_DAY,…
Shivam Panwar
  • 396
  • 1
  • 3
  • 9
19
votes
0 answers

Show Today in Agenda View even there is no event attached with "No event Created"

I have one Android calendar with four View options:Week view, Month view, Day View and Agenda view. I want to show Today in the list of Agenda view even if there is no event Attached to Today. I have tried to check whether any event exist for today…
Dipali Shah
  • 3,742
  • 32
  • 47
19
votes
2 answers

Can you autolink dates in android webview

I have this html:

sawr-o-pel-te meaning 'lizard shield'

April 7th, 2015

4/7/2015

April 7th

Next Monday 6th

202 E South…

Darko Petkovski
  • 3,892
  • 13
  • 53
  • 117
19
votes
2 answers

Querying calendar content provider over a month time, but display instances per day

We've got an application that places dots in a month view where calendar events occur. We're using the calendar content provider to polulate the view. The only problem is we query the content provider around 30 times per month: 1 - 30 november. So…
basvk
  • 4,437
  • 3
  • 29
  • 49
18
votes
3 answers

Custom calendar dayview in android

I want to develop a custom calendar day view for android OS 1.5 and later on. Similar to android day calendar and event add & display in day view. If you have example or source of it then please give me. I have no idea how to start. Please guide…
Nikhil
  • 16,194
  • 20
  • 64
  • 81
18
votes
3 answers

Add Weekly Event to Calendar

I would like to add an event to native Calendar, here i want to repeat this event on every Tuesday until 31 December 2015: btnWeekly.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Calendar…
Sun
  • 6,768
  • 25
  • 76
  • 131
1
2 3
66 67