MediaDrm.ProvideKeyResponse(Byte[], Byte[]) Method

Definition

A key response is received from the license server by the app, then it is provided to the MediaDrm instance using provideKeyResponse.

[Android.Runtime.Register("provideKeyResponse", "([B[B)[B", "")]
public byte[]? ProvideKeyResponse (byte[] scope, byte[] response);
[<Android.Runtime.Register("provideKeyResponse", "([B[B)[B", "")>]
member this.ProvideKeyResponse : byte[] * byte[] -> byte[]

Parameters

scope
Byte[]

may be a sessionId or keySetId depending on the type of the response. Scope should be set to the sessionId when the response is for either streaming or offline key requests. Scope should be set to the keySetId when the response is for a release request.

response
Byte[]

the byte array response from the server

Returns

Byte[]

If the response is for an offline request, the keySetId for the offline keys will be returned. If the response is for a streaming or release request an empty byte array will be returned.

Attributes

Exceptions

if the response indicates that reprovisioning is required

if the response indicates that the server rejected the request

Remarks

A key response is received from the license server by the app, then it is provided to the MediaDrm instance using provideKeyResponse. When the response is for an offline key request, a keySetId is returned that can be used to later restore the keys to a new session with the method #restoreKeys. When the response is for a streaming or release request, an empty byte array is returned.

Java documentation for android.media.MediaDrm.provideKeyResponse(byte[], byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to