Share via


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

Definition

A key response is received from the license server by the app, then it is provided to the DRM engine plugin using provideKeyResponse.

[Android.Runtime.Register("provideKeyResponse", "([B[B)[B", "GetProvideKeyResponse_arrayBarrayBHandler", ApiSince=26)]
public virtual byte[]? ProvideKeyResponse (byte[]? keySetId, byte[] response);
[<Android.Runtime.Register("provideKeyResponse", "([B[B)[B", "GetProvideKeyResponse_arrayBarrayBHandler", ApiSince=26)>]
abstract member ProvideKeyResponse : byte[] * byte[] -> byte[]
override this.ProvideKeyResponse : byte[] * byte[] -> byte[]

Parameters

keySetId
Byte[]

When the response is for a release request, keySetId identifies the saved key associated with the release request (i.e., the same keySetId passed to the earlier {@ link # getKeyRequest} call. It MUST be null when the response is for either streaming or offline key requests.

response
Byte[]

the byte array response from the server

Returns

Byte[]
Attributes

Remarks

A key response is received from the license server by the app, then it is provided to the DRM engine plugin using provideKeyResponse. When the response is for an offline key request, a key-set identifier is returned that can be used to later restore the keys to a new session with the method {@ link # restoreKeys}. When the response is for a streaming or release request, null is returned.

Java documentation for android.media.MediaPlayer.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