Automate your Playlist

Hello, this is a quick little Tip/Trick to automate when to play a playlist using a tool named “Tasker” for Android (sorry IOS)

The app has many features but the one I’ve been using lately is playing my playlist based on time, setting up hours where i lower the volume on my phone or completely stop playing any audio if I connect to a particular WIFI connection/Bluetooth or within range of a location.

some tech skill is needed but shouldn’t be too hard so long as you can logically “program” it in your head/paper.

Some links to get started:
https://forum.joaoapps.com/index.php?resources/

I’m using VLC media player if anyone wants to follow along:
https://wiki.videolan.org/Android_Player_Intents/

Profiles: Think of them of when/under what conditions we want them to be activated.

some examples:

  1. if you shake your phone play x (say you’re Anxious and want to play some The All Purpose Anxiety Removal) boom automatically done for ya.
  2. You wake up at 7 am each morning but don’t want to play audios all night, setup a profile that once it’s 6 am start your morning playlist so by 7 am you feel energized and ready to carpe diem.
  3. Arrive at work and set your volume down to 2 or whatever as to not disturb your coworkers.

as you can see the limitation is really in what you want it to be.

Some Profiles:

Play audio Based on shaking of your phone:

To play audio when you shake your phone, you can create a Profile using Tasker’s Shake event trigger. Here’s how:

  1. Create a Shake Profile

    • Open Tasker and tap the + button to create a new Profile.
    • Select Event > Sensor > Shake.
    • Adjust Sensitivity and Axis if necessary (default settings usually work well).
  2. Link the Audio Task

    • After setting up the shake trigger, Tasker will prompt you to select or create a Task.
    • Choose your audio Task that sends the intent to open VLC and play audio, or create a new Task with that intent if you haven’t already.
  3. Save the Profile

    • Tap Back to save the Profile.

Now, when you shake your phone, Tasker will trigger the audio playback. This should be ideal for quick access to play your chosen audio. Let me know if you need further adjustments!

Turn down the Volume based on WiFi/Bluetooth connected status:

  1. Create a WiFi Connected Profile

    • Open Tasker and tap the + button to create a new Profile.
    • Choose State > Net > WiFi Connected.
    • In the SSID field, enter the exact name of the Wi-Fi network you want to trigger the volume change.
    • Tap Back to save this configuration.
  2. Create a Task to Lower Volume

    • After setting up the WiFi Connected trigger, Tasker will prompt you to create a new Task.
    • Name the Task, e.g., “Lower Volume.”
    • Tap + to add an action.
    • Select Audio > Volume and choose Media Volume.
    • Set the volume level to 5 (or your preferred level).
  3. Save the Profile

    • Tap Back to save the Profile.

Now, Tasker will automatically lower the media volume on your phone whenever you connect to the specified Wi-Fi network.


Some task:

Automatically play a playlist:

  1. Create the Initial Playlist Task

    • Add a Send Intent action with the settings you’ve confirmed:
      Action: `android.media.action.MEDIA_PLAY_FROM_SEARCH`
      Cat: None
      Package: `org.videolan.vlc`
      Class: `org.videolan.vlc.StartActivity`
      Target: Activity
      Extra: query:PLAYLIST NAME

Automatically play a particular audio:

  1. Configure the Intent Action
    • Use the following settings:

      Action: android.intent.action.VIEW
      Cat: None
      Data: file:///path/to/your/audiofile.mp3
      Package: org.videolan.vlc
      Class: org.videolan.vlc.StartActivity
      Target: Activity
      
    • Replace file:///path/to/your/audiofile.mp3 with the exact path to your audio file on the device.

    • For example i got a file at /storage/emulated/0/Download/Frequency/dreamweaver/Energetic Titanium.mp3 I’ll copy and past that in the Data field.

Play a Audio at a particular Time:

Action: android.intent.action.VIEW
Cat: None
Mime Type: None or audio/(*)
Data: file:///path/to/your/audiofile.mp3
Package: org.videolan.vlc
Class: org.videolan.vlc.StartActivity
Target: Activity
IF: %TIME (MATCHES) 17.00

This would play that particular audio at 5 pm (1700) ensure you add a (.) or else it won’t work. If you’re using a 12 hour format just try 5:00 PM


Just thought i share as i know other might make awesome custom scripts.

18 Likes

5 Likes