WearableCalendarContract

public class WearableCalendarContract


The contract between the wearable calendar provider and applications. This API provides a subset of the data available through CalendarContract, but is automatically synced to wearable devices.

Summary

Constants

static final @NonNull Uri

The content:// style URL for the top-level wearable calendar authority.

Public methods

static @NonNull void
addCalendarAuthorityUri(
    @NonNull UriMatcher uriMatcher,
    @NonNull String path,
    @NonNull int code
)

Adds uri to match to the given UriMatcher with calendar authority, String path and the integer code to return when this Uri is matched.

static @NonNull void
addCalendarDataAuthority(
    @NonNull IntentFilter intentFilter,
    @Nullable String port
)

Adds new android.content.Intent to the given IntentFilter with calendar data authority and String host to match.

Constants

CONTENT_URI

@NonNull
public static final @NonNull Uri CONTENT_URI

The content:// style URL for the top-level wearable calendar authority.

Public methods

addCalendarAuthorityUri

@NonNull
public static void addCalendarAuthorityUri(
    @NonNull UriMatcher uriMatcher,
    @NonNull String path,
    @NonNull int code
)

Adds uri to match to the given UriMatcher with calendar authority, String path and the integer code to return when this Uri is matched.

Parameters
@NonNull UriMatcher uriMatcher

The UriMatcher holding matches.

@NonNull String path

The path to match in calendar authority. * may be used as a wild card for any text, and # may be used as a wild card for numbers.

@NonNull int code

The code that is returned when a Uri is matched against the calendar authority and path. Must be positive.

addCalendarDataAuthority

@NonNull
public static void addCalendarDataAuthority(
    @NonNull IntentFilter intentFilter,
    @Nullable String port
)

Adds new android.content.Intent to the given IntentFilter with calendar data authority and String host to match.

Parameters
@NonNull IntentFilter intentFilter

The IntentFilter holding matches.

@Nullable String port

Optional port part of the authority to match. If null, any port is allowed.