Stay organized with collections
Save and categorize content based on your preferences.
DrmStore.ConstraintsColumns
public
static
interface
DrmStore.ConstraintsColumns
android.drm.DrmStore.ConstraintsColumns
|
Interface definition for the columns that represent DRM constraints.
DrmManagerClient.getConstraints()
can be called by an application to find out the contraints on the
actions
that can be performed
on right-protected content. The constants defined in this interface
represent three most common types of constraints: count-based,
date-based, and duration-based. Two or more constraints can be used
at the same time to represent more sophisticated constraints.
In addition, user-defined constraint,
extended metadata
, can be
used if these three types of constraints are not sufficient.
Summary
Constants
public static final String EXTENDED_METADATA
This is a user-defined constraint. It represents the additional constraint
using extended metadata.
Type: TEXT
Constant Value:
"extended_metadata"
LICENSE_AVAILABLE_TIME
public static final String LICENSE_AVAILABLE_TIME
This is a duration-based constaint. It represents the available time left
before the license expires.
Type: TEXT
Constant Value:
"license_available_time"
LICENSE_EXPIRY_TIME
public static final String LICENSE_EXPIRY_TIME
This is a date-based constaint. It represents the time after which
an action
can not be performed on
the rights-protected content.
Type: TEXT
Constant Value:
"license_expiry_time"
LICENSE_START_TIME
public static final String LICENSE_START_TIME
This is a date-based constraint. It represents the time before which
an action
can be performed on
the rights-protected content.
Type: TEXT
Constant Value:
"license_start_time"
MAX_REPEAT_COUNT
public static final String MAX_REPEAT_COUNT
This is a count-based constraint. It represents the maximum
repeat count that can be performed on an
action
.
Type: INTEGER
Constant Value:
"max_repeat_count"
REMAINING_REPEAT_COUNT
public static final String REMAINING_REPEAT_COUNT
This is a count-based constraint. It represents the remaining
repeat count that can be performed on an
action
.
Type: INTEGER
Constant Value:
"remaining_repeat_count"
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DrmStore.ConstraintsColumns\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nDrmStore.ConstraintsColumns\n===========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/drm/DrmStore.ConstraintsColumns \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nDrmStore.ConstraintsColumns\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------|\n| android.drm.DrmStore.ConstraintsColumns |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for the columns that represent DRM constraints.\n[DrmManagerClient.getConstraints()](/reference/android/drm/DrmManagerClient#getConstraints(android.net.Uri,%20int))\ncan be called by an application to find out the contraints on the\n[actions](/reference/android/drm/DrmStore.Action) that can be performed\non right-protected content. The constants defined in this interface\nrepresent three most common types of constraints: count-based,\ndate-based, and duration-based. Two or more constraints can be used\nat the same time to represent more sophisticated constraints.\nIn addition, user-defined constraint,\n[extended metadata](/reference/android/drm/DrmStore.ConstraintsColumns#EXTENDED_METADATA), can be\nused if these three types of constraints are not sufficient.\n\nSummary\n-------\n\n| ### Constants ||\n|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [String](/reference/java/lang/String) | [EXTENDED_METADATA](/reference/android/drm/DrmStore.ConstraintsColumns#EXTENDED_METADATA) This is a user-defined constraint. |\n| [String](/reference/java/lang/String) | [LICENSE_AVAILABLE_TIME](/reference/android/drm/DrmStore.ConstraintsColumns#LICENSE_AVAILABLE_TIME) This is a duration-based constaint. |\n| [String](/reference/java/lang/String) | [LICENSE_EXPIRY_TIME](/reference/android/drm/DrmStore.ConstraintsColumns#LICENSE_EXPIRY_TIME) This is a date-based constaint. |\n| [String](/reference/java/lang/String) | [LICENSE_START_TIME](/reference/android/drm/DrmStore.ConstraintsColumns#LICENSE_START_TIME) This is a date-based constraint. |\n| [String](/reference/java/lang/String) | [MAX_REPEAT_COUNT](/reference/android/drm/DrmStore.ConstraintsColumns#MAX_REPEAT_COUNT) This is a count-based constraint. |\n| [String](/reference/java/lang/String) | [REMAINING_REPEAT_COUNT](/reference/android/drm/DrmStore.ConstraintsColumns#REMAINING_REPEAT_COUNT) This is a count-based constraint. |\n\nConstants\n---------\n\n### EXTENDED_METADATA\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String EXTENDED_METADATA\n```\n\nThis is a user-defined constraint. It represents the additional constraint\nusing extended metadata.\n\n\nType: TEXT\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"extended_metadata\"\n\n\n### LICENSE_AVAILABLE_TIME\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String LICENSE_AVAILABLE_TIME\n```\n\nThis is a duration-based constaint. It represents the available time left\nbefore the license expires.\n\n\nType: TEXT\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"license_available_time\"\n\n\n### LICENSE_EXPIRY_TIME\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String LICENSE_EXPIRY_TIME\n```\n\nThis is a date-based constaint. It represents the time after which\nan [action](/reference/android/drm/DrmStore.Action) can not be performed on\nthe rights-protected content.\n\n\nType: TEXT\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"license_expiry_time\"\n\n\n### LICENSE_START_TIME\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String LICENSE_START_TIME\n```\n\nThis is a date-based constraint. It represents the time before which\nan [action](/reference/android/drm/DrmStore.Action) can be performed on\nthe rights-protected content.\n\n\nType: TEXT\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"license_start_time\"\n\n\n### MAX_REPEAT_COUNT\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String MAX_REPEAT_COUNT\n```\n\nThis is a count-based constraint. It represents the maximum\nrepeat count that can be performed on an\n[action](/reference/android/drm/DrmStore.Action).\n\n\nType: INTEGER\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"max_repeat_count\"\n\n\n### REMAINING_REPEAT_COUNT\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String REMAINING_REPEAT_COUNT\n```\n\nThis is a count-based constraint. It represents the remaining\nrepeat count that can be performed on an\n[action](/reference/android/drm/DrmStore.Action).\n\n\nType: INTEGER\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"remaining_repeat_count\""]]