Example usage for android.provider CalendarContract CALLER_IS_SYNCADAPTER

List of usage examples for android.provider CalendarContract CALLER_IS_SYNCADAPTER

Introduction

In this page you can find the example usage for android.provider CalendarContract CALLER_IS_SYNCADAPTER.

Prototype

String CALLER_IS_SYNCADAPTER

To view the source code for android.provider CalendarContract CALLER_IS_SYNCADAPTER.

Click Source Link

Document

An optional insert, update or delete URI parameter that allows the caller to specify that it is a sync adapter.

Usage

From source file:saschpe.birthdays.service.CalendarSyncService.java

/**
 * Builds URI based on account./*from w  w  w.  j  ava  2s  . co m*/
 */
private static Uri getCalendarUri(Context context, Uri contentUri) {
    return contentUri.buildUpon().appendQueryParameter(CalendarContract.CALLER_IS_SYNCADAPTER, "true")
            .appendQueryParameter(CalendarContract.Calendars.ACCOUNT_NAME, context.getString(R.string.app_name))
            .appendQueryParameter(CalendarContract.Calendars.ACCOUNT_TYPE,
                    context.getString(R.string.account_type))
            .build();
}

From source file:org.gege.caldavsyncadapter.caldav.entities.CalendarEvent.java

private static Uri asSyncAdapter(Uri uri, String account, String accountType) {
    return uri.buildUpon().appendQueryParameter(android.provider.CalendarContract.CALLER_IS_SYNCADAPTER, "true")
            .appendQueryParameter(Calendars.ACCOUNT_NAME, account)
            .appendQueryParameter(Calendars.ACCOUNT_TYPE, accountType).build();
}