Android 12 Developer Preview is here! Try it out, and give us your feedback!

WearableCalendarContract

open class WearableCalendarContract
kotlin.Any
   ↳ androidx.wear.provider.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 classes

Public methods
open static Unit
addCalendarAuthorityUri(@NonNull uriMatcher: UriMatcher, @NonNull path: String, code: Int)

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

open static Unit
addCalendarDataAuthority(@NonNull intentFilter: IntentFilter, @Nullable port: String?)

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

Properties
static Uri

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

Public methods

addCalendarAuthorityUri

open static fun addCalendarAuthorityUri(
    @NonNull uriMatcher: UriMatcher,
    @NonNull path: String,
    code: Int
): Unit

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
uriMatcher UriMatcher: The UriMatcher holding matches.
path String: 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.
code Int: The code that is returned when a Uri is matched against the calendar authority and path. Must be positive.

addCalendarDataAuthority

open static fun addCalendarDataAuthority(
    @NonNull intentFilter: IntentFilter,
    @Nullable port: String?
): Unit

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

Parameters
intentFilter IntentFilter: The IntentFilter holding matches.
port String?: Optional port part of the authority to match. If null, any port is allowed.

Properties

CONTENT_URI

@NonNull static val CONTENT_URI: Uri

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