If you are into flashing custom ROM, you must have come across and most probably used the feature that lets you change tracks on the music player you’re using by long pressing the volume keys while when the screen is either on or off. You can long press once to even reset the time of playback and listen to the song again. You won’t understand how important this feature is if you have been using it for years and suddenly change the device that doesn’t support it. I listen to songs when walking down the street or when on a public vehicle just to ignore the noises around me. This feature is particularly helpful when you are on the streets. You don’t have to pull out your phone from your pocket, turn the screen on and tap on the next button until you find the most suitable song for the moment. This minimizes road accidents in my opinion. If you can skip songs when the screen is off and in your pocket, you can have your eyes on the road. You have no idea how much I have hit my toes on some random rock when skipping a track while on the road. This feature is so useful that it is surprising to not see it as a default feature on manufacturers’ customized Android variant.
There are apps such as Button mapper that can be used to replicate this function. Although it can be done, these apps do not completely give us what custom ROM offers. With apps like Button Mapper, you can remap single press or double press of the volume keys. They cannot intercept long presses; making their functionality a bit limited.
However, we have some good news. Android users with devices running Oreo and above can have this feature without rooting or flashing a custom ROM. You can set an app as a volume key long press listener. This feature lets apps to control the action of long pressing the volume button even when the screen is off. With this, we can finally have the feature we use to only find on custom ROMS on your device without root.
Cilenco, a member of XDA Forums use this listener API to develop an app that lets you skip tracks when the screen is off. If you have Android Oreo, Pie or Q, you can use this app. You can get the app from its official XDA thread. The installation is easy, but you need to know how to use ADB. You can alternatively use the app called Next Track from XDA Developer flar2. You can get the app from its official site.