Stay organized with collections
Save and categorize content based on your preferences.
CalendarCache
class CalendarCache : CalendarContract.CalendarCacheColumns
CalendarCache stores some settings for calendar including the current time zone for the instances. These settings are stored using a key/value scheme. A KEY
must be specified when updating these values.
Summary
Constants |
static String |
The key for updating the time zone used by the provider when it generates the instances table.
|
static String |
The key for reading the last time zone set by the user.
|
static String |
They key for updating the use of auto/home time zones in Calendar.
|
static String |
The value to write to KEY_TIMEZONE_TYPE if the provider should stay in sync with the device's time zone.
|
static String |
The value to write to KEY_TIMEZONE_TYPE if the provider should use a fixed time zone set by the user.
|
Properties |
static Uri! |
The URI to use for retrieving the properties from the Calendar db.
|
Constants
KEY_TIMEZONE_INSTANCES
static val KEY_TIMEZONE_INSTANCES: String
The key for updating the time zone used by the provider when it generates the instances table. This should only be written if the type is set to TIMEZONE_TYPE_HOME
. A valid time zone id should be written to this field.
Value: "timezoneInstances"
KEY_TIMEZONE_INSTANCES_PREVIOUS
static val KEY_TIMEZONE_INSTANCES_PREVIOUS: String
The key for reading the last time zone set by the user. This should only be read by apps and it will be automatically updated whenever KEY_TIMEZONE_INSTANCES
is updated with TIMEZONE_TYPE_HOME
set.
Value: "timezoneInstancesPrevious"
TIMEZONE_TYPE_AUTO
static val TIMEZONE_TYPE_AUTO: String
The value to write to KEY_TIMEZONE_TYPE
if the provider should stay in sync with the device's time zone.
Value: "auto"
TIMEZONE_TYPE_HOME
static val TIMEZONE_TYPE_HOME: String
The value to write to KEY_TIMEZONE_TYPE
if the provider should use a fixed time zone set by the user.
Value: "home"
Properties
URI
static val URI: Uri!
The URI to use for retrieving the properties from the Calendar db.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# CalendarContract.CalendarCache\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCalendarCache\n=============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/CalendarContract.CalendarCache \"View this page in Java\") \n\n```\nclass CalendarCache : CalendarContract.CalendarCacheColumns\n```\n\n|---|------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.CalendarContract.CalendarCache](#) |\n\nCalendarCache stores some settings for calendar including the current time zone for the instances. These settings are stored using a key/value scheme. A [KEY](/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns#KEY:kotlin.String) must be specified when updating these values.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_TIMEZONE_INSTANCES](#KEY_TIMEZONE_INSTANCES:kotlin.String) The key for updating the time zone used by the provider when it generates the instances table. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_TIMEZONE_INSTANCES_PREVIOUS](#KEY_TIMEZONE_INSTANCES_PREVIOUS:kotlin.String) The key for reading the last time zone set by the user. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_TIMEZONE_TYPE](#KEY_TIMEZONE_TYPE:kotlin.String) They key for updating the use of auto/home time zones in Calendar. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TIMEZONE_TYPE_AUTO](#TIMEZONE_TYPE_AUTO:kotlin.String) The value to write to [KEY_TIMEZONE_TYPE](#KEY_TIMEZONE_TYPE:kotlin.String) if the provider should stay in sync with the device's time zone. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TIMEZONE_TYPE_HOME](#TIMEZONE_TYPE_HOME:kotlin.String) The value to write to [KEY_TIMEZONE_TYPE](#KEY_TIMEZONE_TYPE:kotlin.String) if the provider should use a fixed time zone set by the user. |\n\n| Inherited constants ||\n|---|---|\n| From class [CalendarCacheColumns](/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns) |----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY](/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns#KEY:kotlin.String) The key for the setting. Keys are defined in [CalendarCache](#). \u003cbr /\u003e | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [VALUE](/reference/kotlin/android/provider/CalendarContract.CalendarCacheColumns#VALUE:kotlin.String) The value of the given setting. \u003cbr /\u003e | ||\n\n| Properties ||\n|---------------------------------|------------------------------------------------------------------------------------------------|\n| static [Uri](../net/Uri.html#)! | [URI](#URI:android.net.Uri) The URI to use for retrieving the properties from the Calendar db. |\n\nConstants\n---------\n\n### KEY_TIMEZONE_INSTANCES\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val KEY_TIMEZONE_INSTANCES: String\n```\n\nThe key for updating the time zone used by the provider when it generates the instances table. This should only be written if the type is set to [TIMEZONE_TYPE_HOME](#TIMEZONE_TYPE_HOME:kotlin.String). A valid time zone id should be written to this field. \n\n Value: \"timezoneInstances\"\n\n### KEY_TIMEZONE_INSTANCES_PREVIOUS\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val KEY_TIMEZONE_INSTANCES_PREVIOUS: String\n```\n\nThe key for reading the last time zone set by the user. This should only be read by apps and it will be automatically updated whenever [KEY_TIMEZONE_INSTANCES](#KEY_TIMEZONE_INSTANCES:kotlin.String) is updated with [TIMEZONE_TYPE_HOME](#TIMEZONE_TYPE_HOME:kotlin.String) set. \n\n Value: \"timezoneInstancesPrevious\"\n\n### KEY_TIMEZONE_TYPE\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val KEY_TIMEZONE_TYPE: String\n```\n\nThey key for updating the use of auto/home time zones in Calendar. Valid values are [TIMEZONE_TYPE_AUTO](#TIMEZONE_TYPE_AUTO:kotlin.String) or [TIMEZONE_TYPE_HOME](#TIMEZONE_TYPE_HOME:kotlin.String). \n\n Value: \"timezoneType\"\n\n### TIMEZONE_TYPE_AUTO\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TIMEZONE_TYPE_AUTO: String\n```\n\nThe value to write to [KEY_TIMEZONE_TYPE](#KEY_TIMEZONE_TYPE:kotlin.String) if the provider should stay in sync with the device's time zone. \n\n Value: \"auto\"\n\n### TIMEZONE_TYPE_HOME\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val TIMEZONE_TYPE_HOME: String\n```\n\nThe value to write to [KEY_TIMEZONE_TYPE](#KEY_TIMEZONE_TYPE:kotlin.String) if the provider should use a fixed time zone set by the user. \n\n Value: \"home\"\n\nProperties\n----------\n\n### URI\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val URI: Uri!\n```\n\nThe URI to use for retrieving the properties from the Calendar db."]]