When I start to listen shuffleIndicesStream, it gives me empty list. Then, it gives me random indices list like [0, 5, 3, 1, 4, 2]. My playlist is not shuffling when it's created. I have player wrapper class called MyAuioHandler that extends audio_srvice's AudioHandler class.
I removed any shuffling methods, but the outputs was the same.
shuffleIndicesis defined as the indices generated byshuffle()whether or not shuffle mode is currently enabled.effectiveIndicesreturnsshuffleIndicesif shuffle mode is enabled, otherwise returns the normal indices. You probably want something like that.There is no direct stream for that, although there is one for
sequenceStatewhich you could map to what you want:IterableEqualitycomes from the "collection" package.Or, if you want to handle it within your own code, you can keep using
shuffleIndices(or its stream) and just check if shuffle mode is enabled before you use it.