QueueUpdateRequestData

public classQueueUpdateRequestDataextendsObject
implementsParcelableRequestData

Data structure for queue update command requests.

Inherited Constant Summary

Public Method Summary

Integer
getCurrentItemId()
ID of the current media item after the changes.
Long
getCurrentTime()
Milliseconds since the beginning of content to start playback of the current item.
JSONObject
getCustomData()
Returns the custom data.
List<MediaQueueItem>
getItems()
List of queue items to be updated.
Integer
getJump()
Skip/Go backjumpnumber of items with respect to the position of current item (it can be negative).
Integer
getRepeatMode()
Behavior of the queue when all items have been played.
Boolean
getShuffle()
Shuffle the queue items when the update is processed.
void
writeToParcel(Parcelout, int flags)

Inherited Method Summary

Public Methods

publicIntegergetCurrentItemId()

ID of the current media item after the changes.

ifnullor an item with this ID is not found, the current item will be the same as before the update.

publicLonggetCurrentTime()

Milliseconds since the beginning of content to start playback of the current item.

If notnull,this value should take precedence over theMediaQueueItem.getStartTime() value provided at theMediaQueueItem level but only the first time the item is played. This is to cover the common case where the user jumps to the middle of an item so the current time does not apply to the item permanently like theMediaQueueItem.getStartTime(). It avoids having to reset the startTime dynamically (that may not be possible if the phone has gone to sleep).

publicJSONObject getCustomData()

Returns the custom data.

publicList<MediaQueueItem> getItems()

List of queue items to be updated. No reordering should happen, the items should retain the existing order.

This may returnnullif the request doesn't require to update queue items.

publicIntegergetJump()

Skip/Go backjumpnumber of items with respect to the position of current item (it can be negative).

If it is out of boundaries, the current item should be the next logical item in the queue wrapping around the boundaries. The new current item position should follow the rules of the queue repeat behavior.

This may returnnullif the request doesn't require to jump forward/backward.

publicIntegergetRepeatMode()

Behavior of the queue when all items have been played.

This may returnnullif the request doesn't require to change the repeat mode.

publicBooleangetShuffle()

Shuffle the queue items when the update is processed. After the queue items are shuffled, the item at the current item position should be loaded.

  • Iftrue,the queue items should be shuffled.
  • Iffalse,the queue items should be unshuffled.
  • Ifnull,the shuffle state should not change.

public voidwriteToParcel(Parcelout, int flags)