How to Use Volume Keys to Skip Tracks on Your Android Phones

This is a common thing that people search for – how to use the volume keys to skip tracks on Android devices? Some phone manufacturers have this built into the system, but many do not. So today I am going to show you a few different methods of enabling this feature on your Android device, no matter what kind of device you have.

The methods I’m showing you will also work with a headset that has volume control buttons, like mine pictured above. Don’t worry, we are not replacing the functionality of your volume keys – we will be making it so that normal presses still control the volume, but long presses will skip / backwards the tracks on your playlist. The first method is for rooted Android users, the second method is for non-rooted users, though the second method is a bit more technical.

Method 1: GravityBox

This method requires a rooted phone with Xposed Installer. The methods of achieving this depend on the device, so you should search Appuals for a root guide for your device, and also see the article “How to Install Xposed Framework on Android Phones”.

But once you have the Xposed Framework app installed, you just need to go into Download > search for ‘GravityBox’, and download the module for your Android version. For example, there is GravityBox JB for Jellybean, MM for Marshmallow, KK for KitKat.

Enable it under “Modules” by pressing the checkbox, and then press on the module itself to launch the GUI.

Navigate to “Media tweaks” and you’ll immediately see a checkbox for “Volume keys skip track”. Go ahead and enable that, then reboot your device.

Note that this functionality only works when your screen is turned off. So while you’re playing music, make sure your screen is off, then long-press Volume Up to skip track, and Volume Down to go back.

Method 2: Tasker

This method is better for people who cannot achieve root on their device. However, it requires the Tasker app from Google Play, which isn’t free – it’s an incredibly powerful app though, which a load of useful plugins available from various communities.

Once you install Tasker, go ahead and launch it, then disable “Beginner mode” under Preferences.

Now you need to create a new Profile and name it something like “Volume Keys Skip Tracks”. Next we will create two separate contexts, an Event and a State.

This gets a bit complicated, so try to follow as closely as you can. The Event needs to be a Variable Set, and the State should be set to Display > Display State > Off. Similar to the GravityBox method, this makes it so that you only skip tracks with volume key when the display is turned off. The reason is because, if you try to long-press the volume key with the screen turned on, the GUI volume slider pops up.

Now I’m going to include screenshots so you can make sure the Tasker variables look exactly like the screenshots, but here are all the scripts you need:

  1. Variables –> Variable Set. Set %diffpressed to %TIMEMS – %TimePressed. Compare the timestamp when a volume button was last pressed and when the current volume button was pressed. This will serve as the threshold to determine if you meant to change tracks or just change volume.
  2. Task –> If. Set it to If %diffpressed < 750 AND %Vol neq %VOLM. If you double-pressed a volume key within 750ms AND the current saved volume does not equal the current media volume (you will see why this is important later on), then we will determine how to change the track.
  3. Plugin –> KC Tasker Processes. Make it select Spotify or another media app (YouTube, if you use YouTube Red) that you know has difficulties being controlled via traditional media button playback events. Set the variable to %spotify. (As far as I know, apps like Spotify are the exception rather than the rule, so if later on when running this task you notice it isn’t changing tracks on your favorite media player, then come back to this step and add additional apps to check for).
  4. Task –> If. Set it to If %spotify ~ true.
  5. Media –> Media Control. Cmd: Next. Simulate Media Button: Yes. App: Spotify. Check If and set it to if %VOLM > %Vol. Will skip to next track if you pressed volume up twice.
  6. Media –> Media Control. Cmd: Previous. Simulate Media Button: Yes. App: Spotify. Check If and set it to if %VOLM < %Vol. Will skip to previous track if you pressed volume down twice.
  7. Audio –> Media Volume. Level: %Vol. This restores the volume level to what it previously was. Don’t check anything here so the change happens silently.
  8. Task –> Else. These next few actions apply to any general media app (eg. Google Play Music)
  9. Media –> Media Control. Cmd: Next. Simulate Media Button: No. Check If and set it to if %VOLM > %VOL. Will skip to next track if you pressed volume up twice.
  10. Media –> Media Control. Cmd: Previous. Simulate Media Button: No. Check If and set it to if %VOLM < %VOL. Will skip to previous track if you pressed volume down twice.
  11. Audio –> Media Volume. Level: %Vol. This restores the volume level to what it previously was. Don’t check anything here so the change happens silently.
  12. Task –> End If.
  13. Task –> Else. This will save the current time, and save the previous media volume in a variable.
  14. Variables –> Variable Set. Set %TimePressed to %TIMEMS.
  15. Variables –> Variable Set. Set %Vol to %VOLM – 1. Check if and set it to if %Vol < %VOLM.
  16. Variables –> Variable Set. Set %Vol to %VOLM + 1. Check if and set it to if %Vol > %VOLM.
  17. Task –> End If.

 

The post How to Use Volume Keys to Skip Tracks on Your Android Phones appeared first on Android News.

Check Also

Download Android Pie based OxygenOS for Redmi Note 5 Pro

Now you can Update Redmi Note 5 Pro to Android 9 Pie by installing latest OxygenOS ROM. Redmi Note 5 pro is a popular device and there are already have lots of custom ROM available for the device. The OxygenOS is the latest addition to the list and which is ported from OnePlus 5T. If you want to taste Android 9.0 Pie ROM on Redmi Note 5 Pro then follow our guide to Download OxygenOS Redmi Note 5 Pro. XDA Senior Member LeekGeek released the initial build of OxygenOS for Redmi Note 5 Prowhich is based on Open beta build but stable enough to use it as a daily driver. The ROM comes with many Android Pie and OxygenOS features but may contain some bugs. You need to be rooted, and TWRP installed on your device to use this ROM. Download Android Pie based OxygenOS for Redmi Note 5 Pro from below. The ROM is an initial Android Pie build for Redmi Note 5 pro and missing many features but it’s improved with time, but the good news is you can experience Android Pie based OxygenOS on Redmi Note 5 ..

Leave a Reply

Your email address will not be published. Required fields are marked *