WearableCalendarContract

Added in 1.2.0

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

Nested types

Constants

static final @NonNull Uri

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

Public methods

static void
addCalendarAuthorityUri(
    @NonNull UriMatcher uriMatcher,
    @NonNull String path,
    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 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

Added in 1.2.0
public static final @NonNull Uri CONTENT_URI

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

Public methods

addCalendarAuthorityUri

Added in 1.2.0
public static void addCalendarAuthorityUri(
    @NonNull UriMatcher uriMatcher,
    @NonNull String path,
    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.

int code

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

addCalendarDataAuthority

Added in 1.2.0
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.