[MOD] Long Press Volume Buttons to skip songs

Search This thread

jakubklos

Senior Member
Jan 21, 2008
87
167
Prague
Yes, finally it is here!
After couple of hours of coding in smali and debugging endless boot loops ;) it works.

Change your music tracks when your screen is off and music is playing by long pressing the volume buttons.

Update:
- New JB and ICS support
- New 500ms timeout used instead of 1sec.
- New CWM flashable zip
- New Diff available for ROM cooks

ICS: Wanam-Lite ROM 1.7
JB: Wanam-Lite ROM 4.3 (4.1.1)

Enjoy!
 

Attachments

  • VolumeLongPressDiff.zip
    3.5 KB · Views: 3,581
  • VolumeLongPress_S3_ICS.zip
    399.6 KB · Views: 1,349
  • VolumeLongPress_S3_JB.zip
    510.1 KB · Views: 3,790
Last edited:

ariedam

Senior Member
Jun 9, 2010
62
6
Yes, finally it is here!
After couple of hours of coding in smali and debugging endless boot loops ;) it works.

Change your music tracks when your screen is off and music is playing by long pressing the volume buttons.

You need to replace your /system/framework/android.policy.jar with the one below.

I am sure the ROM chefs will be soon putting this in their new ROMs.

I used the Wanam-Lite ROM 1.6 to decompile the original android.policy.jar so if you are on some latest ROM it should work fine.

Enjoy!

Doesn't work in Paranoid 1.5a (CM9).
It doesn't boot any more.
 

tsangwc

Senior Member
Jul 31, 2006
152
35
Replaced the file and changed permission. Reboot the phone and it behaves the same in Sammy player and PA. ICS lock screen is always on for PA. Long pressing up and down will only change volume for me. I am on stock ROM and kernel.
 

jhericurls

Senior Member
Aug 9, 2009
1,481
353
A feature I missed from the AKOP roms, thanks.

Buggers shouldn't be choosers, but any chance of compiling one with a shorter long press duration?
 

jakubklos

Senior Member
Jan 21, 2008
87
167
Prague
Actually, it's 1000ms in your version. I decompiled, changed LONG_PRESS_TIMEOUT:I to 12c and compiled again and it's working great. 12c = 300ms, which is a good value.

Ok good. If you are still able to change the volume too then it's fine. I will try when I get back from my vacation (on Wed)
 

jhericurls

Senior Member
Aug 9, 2009
1,481
353

Top Liked Posts

  • There are no posts matching your filters.
  • 83
    Yes, finally it is here!
    After couple of hours of coding in smali and debugging endless boot loops ;) it works.

    Change your music tracks when your screen is off and music is playing by long pressing the volume buttons.

    Update:
    - New JB and ICS support
    - New 500ms timeout used instead of 1sec.
    - New CWM flashable zip
    - New Diff available for ROM cooks

    ICS: Wanam-Lite ROM 1.7
    JB: Wanam-Lite ROM 4.3 (4.1.1)

    Enjoy!
    5
    I know I am being a **** here, but could someone make one with a shorter time required for the press? You have to press pretty long for it to switch songs haha. Anyway, thanks for this!

    Try this. Long press time is set to 300ms.
    4
    Works with PowerAmp - but u must aktivate ICS-Lockscreen in PA settings.


    ladies and gentlemen, i am an idiot.

    i did not read the op properly.

    this works when the screen is off.
    4
    Do not flash this anymore. Android 4.1.2 has several framework changes. The thread haven't since update. If you want it, just change to wanam ROM. If you must want on your ROM, take android policy from wanam rom , make a cwm flashable and flash it.

    Sent from my GT-I9300 using xda premium
    4
    I made a flashable zip of wanams v5.1 elkc file, working well on omega v34: https://www.dropbox.com/s/uajkpsi2sd3rexv/4.1.2_JB_VOL.LONG.PRESS.SKIP.TRACK.zip