android-calendar

Scheduling more than one pendingIntent to same activity using AlarmManager

≯℡__Kan透↙ 提交于 2020-01-03 17:29:15
问题 Recently I noticed strange behaviour when i tried to schedule Activities to be run in the future using AlarmManager. Look at the code below, the first activity is started in 20 seconds, while the second activity is not started in 40 seconds instead it is started only after 60 seconds. Can anyone explain why the second intent doesn't schedule the second activity to be called instead the third intent does. Does this mean that i can have only one intent for an activity in the AlarmManager. /

Is it possible to remove the Android calendar event

回眸只為那壹抹淺笑 提交于 2019-12-31 07:27:06
问题 I am using the Android calendar. How can I remove a calendar event using code? Is it possible? For clarification, I would like to mention that I don't want a sync process or want to remove events using gdata api. I only want to remove a local calendar event. 回答1: There is no such concept as "remove local calendar's event": There is no "local calendar". There is, at most, a cached representation of the user's Google Calendars. The Calendar application is not part of the SDK 回答2: Try this to

java, android: onActivityResult with different parameters in one activity

有些话、适合烂在心里 提交于 2019-12-25 18:21:19
问题 I have one activity where i use two onActvityResults one for the CalendarView : @Override protected void onActivityResult(int requestCode, int responseCode, Intent intent) one for the retrieving of events in Google Calendar: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) How do i have these two in one activity? Thanks! 回答1: It seems you have not properly understood the concept! This might help you to understand onActivityResult . By using

Android Calendar API - edit/delete one event in a recurring series

我是研究僧i 提交于 2019-12-25 09:59:23
问题 I can add and delete a new recurring event, but how can I edit/delete one event in a recurring event using the new Android Calendar API? And if it is possible how do I update a reminder on one event? Regards Daniel 回答1: Maybe this will help: // First retrieve the instances from the API. Events instances = service.events().instances("primary", "recurringEventId").execute(); // Select the instance to edit Event instance = instances.getItems().get(0); if(youWantToCancel) { instance.setStatus(

Getting an IllegalArgumentException trying to implement ExtendedProperties for android-calendar

纵饮孤独 提交于 2019-12-25 01:08:28
问题 I am trying to create ExtendedProperties for my event and got this error below : 02-06 09:43:04.484: E/AndroidRuntime(9530): FATAL EXCEPTION: IntentService[AsyncQueryServiceHelper] 02-06 09:43:04.484: E/AndroidRuntime(9530): java.lang.IllegalArgumentException: Only sync adapters may write using content://com.android.calendar/extendedproperties 02-06 09:43:04.484: E/AndroidRuntime(9530): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:167) 02-06 09:43:04.484: E

WearableCalendarContract returns some null fields

青春壹個敷衍的年華 提交于 2019-12-24 09:39:05
问题 I have made an Android Wear watch face which has a function that retrieves calendar events using WearableCalendarContract. Starting a few days ago it now returns null data in fields concerning start/stop minutes and start/stop days and I cannot make it work again. The code looks like this: private final String[] PROJECTION = { CalendarContract.Calendars._ID, // 0 CalendarContract.Instances.TITLE, // 1 CalendarContract.Instances.START_MINUTE,// 2 CalendarContract.Instances.END_MINUTE, // 3

android: EXDATE format when adding a calendar event

╄→гoц情女王★ 提交于 2019-12-24 08:48:43
问题 Can someone explain how to use EXDATE when adding event to android calendar? The documentation is pretty unclear about the format in which the EXDATE should be put. I tried many formats, these are some of them: values.put(Events.EXDATE, "TZID=Europe/London:20130116T080000"); values.put(Events.EXDATE, "20130116T080000Z"); values.put(Events.EXDATE, "20130116T080000"); values.put(Events.EXDATE, "20130116"); but none of them works. Any idea how to make an event not appear on a particular date, if

Android : Set reminder functionality

爱⌒轻易说出口 提交于 2019-12-24 04:19:52
问题 I am developing an application with reminder functionality. The code i used is as follows to set the reminder and event: private void addReminder(int statrYear, int startMonth, int startDay, int startHour, int startMinut, String title){ // Convert start of begin time of reminder in milliseconds. Calendar beginTime = Calendar.getInstance(); beginTime.set(statrYear, startMonth, startDay, startHour, startMinut); long startMillis = beginTime.getTimeInMillis(); // String to access default google

Insert new calendar with SyncAdapter- Calendar API Android

假装没事ソ 提交于 2019-12-24 03:28:03
问题 I'm trying to add a new calendar to my google account by using the Android Calendar Provider API. As written in the API you have to implement a SyncAdapter to create a new calendar. So, if I understand things right I "just" have to add a new entry with my syncadapter in the CalendarContract.Calendars table - but I don't know how to do this. Unfortunately I couldn't find any examples on how to create a new calendar. (And yes, a googled a lot already). I would be grateful for even a step in the

How to create custom calendar with event management? [closed]

妖精的绣舞 提交于 2019-12-23 08:54:14
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . My Requirement:- I am trying to make an app which have only calendar functionality, when user opens the app, calendar opens same like Google calendar. I receive events from web service and i have to show those