public class

DrmRights

extends Object
java.lang.Object
   ↳ android.drm.DrmRights

Class Overview

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 processDrmInfo(DrmInfo) method and then using the resulting ProcessedData object to invoke the DrmRights(ProcessedData, String) constructor.

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

Summary

Public Constructors
DrmRights(String rightsFilePath, String mimeType)
Creates a DrmRights object with the given parameters.
DrmRights(String rightsFilePath, String mimeType, String accountId)
Creates a DrmRights object with the given parameters.
DrmRights(String rightsFilePath, String mimeType, String accountId, String subscriptionId)
Creates a DrmRights object with the given parameters.
DrmRights(File rightsFile, String mimeType)
Creates a DrmRights object with the given parameters.
DrmRights(ProcessedData data, String mimeType)
Creates a DrmRights object with the given parameters.
Public Methods
String getAccountId()
Retrieves the account ID associated with this DrmRights object.
byte[] getData()
Retrieves the rights data associated with this DrmRights object.
String getMimeType()
Retrieves the MIME type associated with this DrmRights object.
String getSubscriptionId()
Retrieves the subscription ID associated with this DrmRights object.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DrmRights (String rightsFilePath, String mimeType)

Since: API Level 11

Creates a DrmRights object with the given parameters.

Parameters
rightsFilePath Path to the file containing rights information.
mimeType MIME type.

public DrmRights (String rightsFilePath, String mimeType, String accountId)

Since: API Level 11

Creates a DrmRights object with the given parameters.

Parameters
rightsFilePath Path to the file containing rights information.
mimeType MIME type.
accountId Account ID of the user.

public DrmRights (String rightsFilePath, String mimeType, String accountId, String subscriptionId)

Since: API Level 11

Creates a DrmRights object with the given parameters.

Parameters
rightsFilePath Path to the file containing rights information.
mimeType MIME type.
accountId Account ID of the user.
subscriptionId Subscription ID of the user.

public DrmRights (File rightsFile, String mimeType)

Since: API Level 11

Creates a DrmRights object with the given parameters.

Parameters
rightsFile File containing rights information.
mimeType MIME type.

public DrmRights (ProcessedData data, String mimeType)

Since: API Level 11

Creates a DrmRights object with the given parameters.

Parameters
data A ProcessedData object containing rights information. data could be null because it's optional for some DRM schemes.
mimeType The MIME type.

Public Methods

public String getAccountId ()

Since: API Level 11

Retrieves the account ID associated with this DrmRights object.

Returns
  • The account ID.

public byte[] getData ()

Since: API Level 11

Retrieves the rights data associated with this DrmRights object.

Returns
  • A byte array representing the rights data.

public String getMimeType ()

Since: API Level 11

Retrieves the MIME type associated with this DrmRights object.

Returns
  • The MIME type.

public String getSubscriptionId ()

Since: API Level 11

Retrieves the subscription ID associated with this DrmRights object.

Returns
  • The subscription ID.