Calendar disappears after a few seconds
<p>I want to create a new calendar in the existing google account. I do this on API level 7. I know, that not until ICS the calendar is supported. But I need it on API level 7.
Following is the way I do it now. The calender creation works, but after a few seconds the calendar disappears.</p>

<pre><code>public void createNewCalendar(String name, String displayName, String sync_account) {

    ContentValues calendar = new ContentValues();
    calendar.put("_sync_account", sync_account); // the account read out befor
    calendar.put("_sync_account_type","com.google"); 
    calendar.put("name", name);
    calendar.put("displayName",displayName);
    calendar.put("hidden",0);
    calendar.put("color",0xFF019090);
    calendar.put("access_level", 700);
    calendar.put("sync_events", 1);
    calendar.put("timezone", "Europe/Paris");
    calendar.put("ownerAccount", sync_account);
    Uri calendarUri = Uri.parse("content://com.android.calendar/calendars");
    activity.getContentResolver().insert(calendarUri, calendar);        
}
</code></pre>

<p>What can I do to be able to synchronize the calendar that it appears on the google calendar?</p>

<p>EDIT:
Here the shema of the database:</p>

<pre><code>CREATE TABLE Calendars (_id INTEGER PRIMARY KEY,_sync_account TEXT,_sync_account_type TEXT,_sync_id TEXT,_sync_version TEXT,_sync_time TEXT,
_sync_local_id INTEGER,_sync_dirty INTEGER,_sync_mark INTEGER,url TEXT,name TEXT,displayName TEXT,displayOrder INTEGER,hidden INTEGER NOT 
NULL DEFAULT 0,color INTEGER,access_level INTEGER,selected INTEGER NOT NULL DEFAULT 1,sync_events INTEGER NOT NULL DEFAULT 0,location TEXT,
timezone TEXT,ownerAccount TEXT, organizerCanRespond INTEGER NOT NULL DEFAULT 1,hide_declined INTEGER NOT NULL DEFAULT 0,reminder_type INTEGER
NOT NULL DEFAULT 1,reminder_duration INTEGER NOT NULL DEFAULT 10,alerts_vibrate INTEGER NOT NULL DEFAULT 1,alerts_ringtone TEXT,start_view 
TEXT,detailed_view TEXT,sync_source INTEGER NOT NULL DEFAULT 0);
</code></pre>
