this post was submitted on 17 Oct 2025
7 points (81.8% liked)

Android Apps

2557 readers
1 users here now

Welcome to the !androidapps Community!

We're thrilled to have you here and be part of our vibrant community centered around Android apps. To ensure a positive and valuable experience for everyone, we kindly ask you to adhere to the following community guidelines:

  1. Be Respectful: Treat fellow community members with respect and kindness. We encourage constructive discussions and discourage personal attacks, harassment, or any form of offensive behavior.

  2. Stay on Topic: Keep the discussions focused on Android apps and related topics. Avoid veering off into unrelated discussions or spamming the community with irrelevant content.

  3. Quality Contributions: Share valuable insights, tips, and recommendations related to Android apps. Provide helpful feedback and support to other users. Engage in meaningful discussions that contribute to the community's knowledge base.

  4. Mindful Self-Promotion: While we welcome developers to share their apps and updates, we ask that you do so in a balanced and considerate manner. Excessive self-promotion or spamming is not allowed. Instead, focus on providing value and engaging with the community.

  5. Follow Appropriate Guidelines: Ensure your posts and comments comply with the platform's terms of service, as well as local laws and regulations. Refrain from sharing content that is illegal, harmful, or violates intellectual property rights.

  6. Be Transparent: If you're a developer promoting your own app, clearly disclose your affiliation to maintain transparency within the community. This fosters trust and authenticity.

  7. Report Inappropriate Content: If you come across any content that violates these guidelines or seems inappropriate, please report it to the moderator for review and appropriate action.

Remember, the !androidapps community thrives on collaboration and mutual support. Let's work together to create a positive environment where we can all learn, grow, and discover amazing Android apps!

founded 2 years ago
MODERATORS
 

Hi everyone. My name is Victor.

I have been a premium user of Spotify for over 5 years. I noticed that I had over 800 tracks in my playlist, but Spotify would consistently play about 10 of them on repeat in a specific order. I could predict the exact song Spotify would play next every single time.

I have been writing code since I was 7 years old (Q-Basic. Yes, I’m old), and I also have a Master’s in Computer Science, so I decided to write a website that would randomize the order of my tracks in the playlist. I would then play the playlist with shuffle off. The idea was that since the order of the tracks had become random, playing the tracks serially would allow me to hear tracks in a random order.

It worked!

But, Spotify has a rate limit (Spotify restricts how fast developers can do stuff on Spotify). So, I had to slow down the process of randomizing the tracks. This caused 2 issues:

The more songs I had in the playlist, the slower the process was.

I would have to randomize the tracks again every so often.

So, I went back to the drawing board to figure out how I could completely automate the entire process and make it faster.

This was the idea:

I would ask Spotify to tell me when it wants to play a new track.

I would then choose a truly random track in the playlist and add it to the queue Spotify plays from.

Rinse Repeat.

It worked! It also solved a number of problems:

its all happening in the background, so there is no need to manually go to some website to randomize your tracks.

It doesn’t make lots of requests to Spotify’s server. It’s talking directly to the Spotify app on your device most of the time.

It leaves the order of your tracks as is. You might have chosen the order you like your tracks to be played in.

One of my early users told me to make it remember the tracks it has already played. Such that, it would play random tracks it has not played before. After playing all the tracks in the playlist exactly once, randomly. It would then reset itself and do it all again. I implemented it quickly and enjoyed an even better Spotify listening experience.

There were some challenges:

Since the app runs in the background to listen to Spotify’s messages, it can only work on Android devices. IOS does not allow apps to run indefinitely in the background.

Even though Android allows apps to run in the background, it doesn’t allow apps to run for more than 24 hours at a time. So, the app will need to be restarted every 24 hours.

Android 14+ devices have some battery optimizations that stop Spotify from sending the messages my app needs to work properly. I found a way around this issue. The solution would be for my app to listen to the Notifications on the device. Spotify puts up a notification when it’s playing tracks. My app could pay attention to that notification to learn when a new track is being played. But, there is no way to place a filter such that my app would only see Spotify’s notification. It would need to see all notifications. I do not want that much responsibility, so I did not implement it.

Over the years, I have added more features to the app such that it can be used to manage your Spotify account as well.

The name of the app is “Virtual Shuffle – Truly Random”. You can find it here: https://play.google.com/store/apps/details?id=org.virock.virtualshufflev2&hl=en

You can ask me any questions about it. You can also request additional features.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here