android-calendar

Add a Native Calendar with Titanium

℡╲_俬逩灬. 提交于 2019-12-12 05:39:53
问题 For an app developed in Titanium, it is required to be possible to add Events into the Native Android Calendar. While the docs specify plenty of methods to add Events to the native calendar (selectable ones), it does not provide the methods to create a new Calendar (conceptually a layer that holds events) Has anyone been able to create a new Calendar on Android and how, specifically on Titanium, can one do that? 回答1: Creating a new calendar for Android is not currently supported in Titanium.

What should be CALENDAR_ID while adding event to calendar in android?

五迷三道 提交于 2019-12-12 05:27:38
问题 Here is my Code and I want to know what is value for "CalendarContract.Events.CALENDAR_ID"? This code is working on Pre Android N Os but in Nougat if I put "1" as value it creates an event in specific Field(Reminder, Birthday, Holiday etc) and it varies user to user. So if I pass "5" as value in some nougat device then I might get proper output in one device but in another phone that event might gets created with reminder or holiday and gets deleted automatically with in few seconds.

How to show a specific month in android CalendarView?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 05:18:24
问题 I want to show a specific month to user using android CalendarView. Please help me to implement this functionality. I wrote following code but it is not working. CalendarView calendarView = (CalendarView) findViewById(R.id.calendarView); Calendar calendar1 = Calendar.getInstance(); calendar1.set(2016, 6, 1); Calendar calendar2 = Calendar.getInstance(); calendar2.set(2016, 6, 30); calendarView.setMinDate(calendar1.DATE); calendarView.setMaxDate(calendar2.DATE); Following output is coming when

Calendar corrupted in Android

≡放荡痞女 提交于 2019-12-12 02:41:26
问题 We are adding entries into the Android calendar from within our code. For some reason the calendar seems to have been corrupted in some way. We can't delete any event at all - even ones not added from within our code. If we try to delete one that was added via our code it crashes. This is the code we use to insert the event. Note that the text is in Hebrew and we are talking about Android 4.1 and up. // Select which calendar application to use: int cal_id = CalendarAppointmentScheduler.

How to format date in Android in dd/mm/yy 00:00AM

☆樱花仙子☆ 提交于 2019-12-12 01:45:43
问题 How to format my date in Android. I have String which gets date in below format String format = java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()); Output 25 Nov 2013 17:39:00 I want this to be converted in below format dd/mm/yy 5:39PM I am using below code to get Date. Also how to get that format into String ? 回答1: Using SimpleDateFormat class you can do it. SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy hh:mm"); String format = sdf.format(Calendar

How can I have a calendar with date as horizontal rows and time in vertical columns

a 夏天 提交于 2019-12-11 17:23:17
问题 the title says it all. I've looked into android arsenal but couldn't find anything that fit my needs. I need to have all the functionality of calendar. Person1 and Person2 can be any string. the only problem is the horizontal dates with vertical columns time. How do I do that? any links can get me started would be fine. Thanks. 回答1: multiple recyclerView will help you to achieve this ... date-picker in one and time-picker in another align them in horizontal and vertical as needed. 来源: https:/

Oreo Calendar changes

╄→尐↘猪︶ㄣ 提交于 2019-12-11 17:10:05
问题 I used to get the Calendar changes using this code in the manifest: <receiver android:name=".MyReceiver"> <intent-filter> <action android:name="android.intent.action.PROVIDER_CHANGED" /> <data android:scheme="content" /> <data android:host="com.android.calendar" /> </intent-filter> </receiver> But this is not possible with Android 8 Oreo. I have read it needs a Job or something similar (I have never used jobs yet,I haven't need them). Could any one type an example of a job to get fired every

Android Calendar Intent event end always one hour after start

和自甴很熟 提交于 2019-12-11 16:46:58
问题 I've looked into this problem a lot and I can't seem to find anyone having the same difficulties. The start time is working fine but the end time is always set to being exactly one hour after the initial start time of the event. Calendar calStart = Calendar.getInstance(); calStart.set(2014, 02, 04, 13, 20, 0); Calendar calEnd = Calendar.getInstance(); calEnd.set(2014, 02, 04, 15, 30, 0); Intent intent = new Intent(Intent.ACTION_INSERT) .setData(Events.CONTENT_URI) .putExtra(CalendarContract

WearableCalendarContract query doesn't return recurring events

左心房为你撑大大i 提交于 2019-12-11 08:47:24
问题 I'm creating a watchface for Android Wear which will display calendar events. Based on this page (and the WatchFace sample provided in the SDK), I managed to query the next events for the day, and display them on my watchface (below is the code I use to query the events). The problem is that recurring events are not returned in the cursor, and thus are not displayed on the watch face. Is there any parameter to add in the query to get recurring events ? private static final String[] PROJECTION

Android Calendar Provider exception on recurring events

浪子不回头ぞ 提交于 2019-12-11 08:12:17
问题 I try to utilize the CalendarContract content provider: http://developer.android.com/reference/android/provider/CalendarContract.Events.html I only can't seem to find anything regarding exception on recurring events. I use the Instances URI to query. I added an event (on calendar.google.com) and made it repeat every day. Now I changed one of the instances' time and the content provider gives me the exception correctly: // Original event instance: eventID: 320 instanceID: 651 startdate: Wed