Added in API level 11
Deprecated in API level 30

DrmRights

open class DrmRights
kotlin.Any
   ↳ android.drm.DrmRights

An entity class that wraps the license information retrieved from the online DRM server.

A caller can instantiate a DrmRights object by first invoking the DrmManagerClient#processDrmInfo(DrmInfo) method and then using the resulting ProcessedData object to invoke the DrmRights#DrmRights(ProcessedData, String) constructor.

A caller can also instantiate a DrmRights object by using the DrmRights#DrmRights(String, String) constructor, which takes a path to a file containing rights information instead of a ProcessedData.

Please note that the account id and subscription id is not mandatory by all DRM agents or plugins. When account id or subscription id is not required by the specific DRM agent or plugin, they can be either null, or an empty string, or any other don't-care string value.

Summary

Public constructors
DrmRights(rightsFilePath: String!, mimeType: String!)

Creates a DrmRights object with the given parameters.

DrmRights(rightsFilePath: String!, mimeType: String!, accountId: String!)

Creates a DrmRights object with the given parameters.

DrmRights(rightsFilePath: String!, mimeType: String!, accountId: String!, subscriptionId: String!)

Creates a DrmRights object with the given parameters.

DrmRights(rightsFile: File!, mimeType: String!)

Creates a DrmRights object with the given parameters.

DrmRights(data: ProcessedData!, mimeType: String!)

Creates a DrmRights object with the given parameters.

Public methods
open String!

Retrieves the account ID associated with this DrmRights object.

open ByteArray!

Retrieves the rights data associated with this DrmRights object.

open String!

Retrieves the MIME type associated with this DrmRights object.

open String!

Retrieves the subscription ID associated with this DrmRights object.

Public constructors

DrmRights

Added in API level 11
DrmRights(
    rightsFilePath: String!,
    mimeType: String!)

Creates a DrmRights object with the given parameters.

Parameters
rightsFilePath String!: Path to the file containing rights information.
mimeType String!: MIME type. Must not be null or an empty string.

DrmRights

Added in API level 11
DrmRights(
    rightsFilePath: String!,
    mimeType: String!,
    accountId: String!)

Creates a DrmRights object with the given parameters.

Parameters
rightsFilePath String!: Path to the file containing rights information.
mimeType String!: MIME type. Must not be null or an empty string.
accountId String!: Account ID of the user.

DrmRights

Added in API level 11
DrmRights(
    rightsFilePath: String!,
    mimeType: String!,
    accountId: String!,
    subscriptionId: String!)

Creates a DrmRights object with the given parameters.

Parameters
rightsFilePath String!: Path to the file containing rights information.
mimeType String!: MIME type. Must not be null or an empty string.
accountId String!: Account ID of the user.
subscriptionId String!: Subscription ID of the user.

DrmRights

Added in API level 11
DrmRights(
    rightsFile: File!,
    mimeType: String!)

Creates a DrmRights object with the given parameters.

Parameters
rightsFile File!: File containing rights information.
mimeType String!: MIME type. Must not be null or an empty string.

DrmRights

Added in API level 11
DrmRights(
    data: ProcessedData!,
    mimeType: String!)

Creates a DrmRights object with the given parameters.

Parameters
data ProcessedData!: A ProcessedData object containing rights information. Must not be null.
mimeType String!: The MIME type. It must not be null or an empty string.

Public methods

getAccountId

Added in API level 11
open fun getAccountId(): String!

Deprecated: Deprecated in Java.

Retrieves the account ID associated with this DrmRights object.

Return
String! The account ID.

getData

Added in API level 11
open fun getData(): ByteArray!

Deprecated: Deprecated in Java.

Retrieves the rights data associated with this DrmRights object.

Return
ByteArray! A byte array representing the rights data.

getMimeType

Added in API level 11
open fun getMimeType(): String!

Deprecated: Deprecated in Java.

Retrieves the MIME type associated with this DrmRights object.

Return
String! The MIME type.

getSubscriptionId

Added in API level 11
open fun getSubscriptionId(): String!

Deprecated: Deprecated in Java.

Retrieves the subscription ID associated with this DrmRights object.

Return
String! The subscription ID.