Note that there are some explanatory texts on larger screens.

plurals
  1. POAfter adding an event to a user-created calendar in android,the event title doesn't show up
    primarykey
    data
    text
    <p>I'm developing an android app that creates a calendar on the phone the first time the application is installed. When I create an event, either programmatically or using the device itself, the event will show up in the calendar but its title is missing. I'm testing my code on HTC nexus one. </p> <p>Since I'm getting the same behavior when creating the event through my code or through the device, I'm suspecting there is a problem in the code I wrote to create a new calendar account. I am doing so by adding a new field in the <strong>calendars</strong> table of the <strong>calendar.db</strong> database, whose URI is: "content://com.android.calendar/calendars"</p> <pre><code> private Uri addNewCalendar() { if (!calendarExists()) { ContentResolver contentResolver = mContext.getContentResolver(); ContentValues cv = new ContentValues(); cv.put(Calendar.Calendars._SYNC_ACCOUNT, mAccount.name); cv.put(Calendar.Calendars._SYNC_ACCOUNT_TYPE, mAccount.type); cv.put(Calendar.Calendars._SYNC_TIME, new Date().getTime()); cv.put(Calendar.Calendars.URL, "http://www.example.com"); cv.put(Calendar.Calendars.NAME, mAccount.name); cv.put(Calendar.Calendars.DISPLAY_NAME, mAccount.name); cv.put(Calendar.Calendars.HIDDEN, 0); cv.put(Calendar.Calendars.COLOR, 14417920); cv.put(Calendar.Calendars.ACCESS_LEVEL, 700); cv.put(Calendar.Calendars.SELECTED, 1); cv.put(Calendar.Calendars.SYNC_EVENTS, 1); cv.put(Calendar.Calendars.TIMEZONE, "GMT"); cv.put(Calendar.Calendars.OWNER_ACCOUNT, mAccount.name); Uri uri = contentResolver.insert(Calendar.Calendars.CONTENT_URI.buildUpon().build(), cv); return uri; } return null; } </code></pre> <p>Also, when checking whether the title field of the event is actually written in the database, I found it is saved correctly. I can see the event title when I try to edit the event on the phone.</p> <p>Anyone has an idea why I'm having this problem? If you need more information, please let me know.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload