Methods Summary |
---|
static void | addNewMetadata(android.os.Bundle metadata, RemoteControlClient.MetadataEditor editor)
if (metadata.containsKey(METADATA_KEY_RATING)) {
editor.putObject(MediaMetadataEditor.RATING_KEY_BY_OTHERS,
metadata.getParcelable(METADATA_KEY_RATING));
}
if (metadata.containsKey(METADATA_KEY_USER_RATING)) {
editor.putObject(MediaMetadataEditor.RATING_KEY_BY_USER,
metadata.getParcelable(METADATA_KEY_USER_RATING));
}
if (metadata.containsKey(METADATA_KEY_ART)) {
Bitmap art = metadata.getParcelable(METADATA_KEY_ART);
editor.putBitmap(MediaMetadataEditor.BITMAP_KEY_ARTWORK, art);
} else if (metadata.containsKey(METADATA_KEY_ALBUM_ART)) {
// Fall back to album art if the track art wasn't available
Bitmap art = metadata.getParcelable(METADATA_KEY_ALBUM_ART);
editor.putBitmap(MediaMetadataEditor.BITMAP_KEY_ARTWORK, art);
}
|
public static java.lang.Object | createMetadataUpdateListener(MediaSessionCompatApi14.Callback callback)
return new OnMetadataUpdateListener<MediaSessionCompatApi14.Callback>(callback);
|
public static void | setMetadata(java.lang.Object rccObj, android.os.Bundle metadata, boolean supportRating)
RemoteControlClient.MetadataEditor editor = ((RemoteControlClient) rccObj).editMetadata(
true);
MediaSessionCompatApi14.buildOldMetadata(metadata, editor);
addNewMetadata(metadata, editor);
if (supportRating && android.os.Build.VERSION.SDK_INT > 19) {
editor.addEditableKey(RemoteControlClient.MetadataEditor.RATING_KEY_BY_USER);
}
editor.apply();
|
public static void | setOnMetadataUpdateListener(java.lang.Object rccObj, java.lang.Object onMetadataUpdateObj)
((RemoteControlClient) rccObj).setMetadataUpdateListener(
(RemoteControlClient.OnMetadataUpdateListener) onMetadataUpdateObj);
|