android-calendar

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

别等时光非礼了梦想. 提交于 2019-11-27 01:35:39
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 is also an Alarm clock app which changes its icon setting the current time, in other words, changing every minute. That isn't a widget, but a real app icon. Then it must have a way to do so. How can I do it in my app? Whatever your home screen is has special hooks for whatever your calendar app is and whatever your alarm clock app is. In general,

BroadcastReceiver for Android Calendar events

喜你入骨 提交于 2019-11-27 01:02:33
问题 I am trying to write a BroadcastReceiver that listens to events like insert, edit, delete to the native android calendar (ICS and above). So whenever one of these events occur the app should be able to at the least know that these events occurred. Any one has an idea, how to do this or any reference links. I have written my own broadcasterReceiver class that extends from BroadcastReceiver. Can't figure out the values in the manifest like, currently I have this which is not working: <receiver

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

試著忘記壹切 提交于 2019-11-27 00:18:03
问题 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 confused. How can I add events to the default calendar of a user? I don't need to be synced. EDIT: I do not want to launch an event adding Intent. Instead I want to add them completely from code and not launch another activity. I need to be able to test

How to read and edit Android calendar events using the new Android 4.0 Ice Cream Sandwich API?

不打扰是莪最后的温柔 提交于 2019-11-26 23:53:43
We are trying to show user the Ice cream Sandwich calendar view, when they want to add a new event. We can only test this in emulator. The other problem is that we can't find any examples how to use CalendarProvider. This is the right class when it comes to dealing with Sandwich calendar? Would this be easier to do with Google Gdata API? [EDIT] So what we got working was adding an event to calendar but it was not through the API, we open the calendar in the correct view. But now the problem is that it does not work in the emulator because we haven't been able to get the calendar synced. So the

How to get access to the calendars on a Android phone?

混江龙づ霸主 提交于 2019-11-26 23:44:16
问题 I gave some tries to access the calendars on a Android phone, but none of my code worked, is there someone that knows for sure, how to read/query the calendar events for a specified time range? 回答1: String[] projection = new String[] { CalendarContract.Events.CALENDAR_ID, CalendarContract.Events.TITLE, CalendarContract.Events.DESCRIPTION, CalendarContract.Events.DTSTART, CalendarContract.Events.DTEND, CalendarContract.Events.ALL_DAY, CalendarContract.Events.EVENT_LOCATION }; // 0 = January, 1

Add Weekly Event to Calendar

醉酒当歌 提交于 2019-11-26 20:55:29
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 calendar = Calendar.getInstance(); Intent intent = new Intent(Intent.ACTION_INSERT) .setData(Events.CONTENT_URI) .setType("vnd.android.cursor.item/event") .putExtra(Events.TITLE, "Tuesdays") .putExtra(Events.DESCRIPTION, "Tuesday Specials") .putExtra(Events.EVENT_LOCATION, "Lixious Bench") .putExtra(Events.RRULE, "FREQ=WEEKLY;BYDAY=Tu;UNTIL=20151231") .putExtra(Events

Android Calendar, get Event Id

让人想犯罪 __ 提交于 2019-11-26 20:43:39
问题 i'm writing an application that need to add some events to a calendar in android. For inserting i just used the following code: public void onItemClick(AdapterView<?> adapter, View curview, int position, long id) { WhoisEntry entry = this.adapter.getItem(position); String domainName = entry.getDomainName(); Date expDate = entry.expirationDate; Toast.makeText(getApplicationContext(), "Domain: " + domainName, Toast.LENGTH_SHORT).show(); Calendar cal = Calendar.getInstance(); Intent intent = new

Change CalendarView style

柔情痞子 提交于 2019-11-26 19:04:24
I'm trying to add a CalendarView in my application, which uses the Theme.Light theme. The problem is, the days numbers of this calendar are rendered in white, so while using a light theme, you can't see them. Right now, I have the following code in my XML layout file : <CalendarView android:id="@+id/calendar1" android:layout_width="500dp" android:layout_height="300dp"/> I tried to force the calendar theme like this : <CalendarView android:id="@+id/calendar1" android:layout_width="500dp" android:layout_height="300dp" android:theme="@android:style/Theme.Light" /> But it doesn't change anything.

Android: CalendarView OnDateChangeLIstener

风格不统一 提交于 2019-11-26 17:11:20
问题 I've already implemented this listener in order for me to display something when a certain date is clicked, but the problem is that when i scroll the CalendarView down, it automatically displayed something but i didn't click anything, i just scrolled down to anther month in CalendarView and then there goes a, say a Toast or a Log, whichever (I guess it makes sense since the listener itself fires `onDateChange and since scrolling down the calendar also changes the date currently selected). So

AlarmManager setInexactRepeating, setWindow, setRepeating methods do not fire alarm when called from within loop for week days

夙愿已清 提交于 2019-11-26 14:54:51
问题 Requirement :- I need to fire alarm on selected days of a week and a date from which alarms would start(for example I want to fire alarm on Friday and Saturday of every week starting from May 26, 2017 at 6:45 PM) Problem:- BroadcastReceiver's onReceive() method does not executes when AlarmManager setInexactRepeating , setWindow or setRepeating methods are called from within a loop. Code used for this task is mentioned below:- AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?>