[7.1-12] Physical Button Master Control 4.4

Search This thread

Blizzard22

Senior Member
Jun 7, 2010
451
75
Redmi Note 10 Pro
Nice work man!
Work's like a charm on my Note 2.
But I have an question:
I currently have two media players (BeyondPod for podcasts, Poweramp for music) and I can't control the BeyondPod music player with this module.
Could you please make that module 'remember' which player I used the last time or/and set which player can be controlled with your app?
That would really make the app even more awesome and useful because I currently listen to a lot of podcast and would like to control it with your app.
Keep the great work on!
 

KDB223

Senior Member
Aug 15, 2013
525
212
Thank you, thank you, thank you man !!!! I know there's a thanks button but my gratitude towards you cannot the expressed through a button (or this reply). I've been looking for a module like this FOREVER!
Again, thank you. :thumbup:

sent from my Xperia E (C1504) using xda Premium
HIT THE THANKS BUTTON IF I WAS OF ANY HELP :D
 

lesscro

Senior Member
Jul 16, 2007
4,486
2,266
Paris
This apps sounds good and will be a replacement of heaset button controller...

then request from me :

• ability to use call/uncall from headset (maybe already work but only read news from Portal)
• ability to manage sound when headset is enable (like when music start, sound start @ 20%)
• ability to use TTS to know who call you, like read name is available
• ability to bypass longress on HTC and 4.x android rom (google now )


And if you can do that, i will be happy to make you a prez and icon app... deal or not ??
 

nbock97

Senior Member
Apr 14, 2012
403
97
awesome

searched for something like this some months/years ago :D

now there are costum roms out for my new phone and I don't need it but maybe for my next device! thank you :)
 

imanskoi

Member
Dec 11, 2013
6
1
Naga City
1910 33624869

Can you also add the headset button(s) as a set of key? if possible. :fingers-crossed:.

This may come in handy when phone is in our pocket. heheh

Anyways, Thanks for this one.
 

MashineGun

Senior Member
Jan 10, 2010
142
54
Can you also add the headset button(s) as a set of key? if possible. :fingers-crossed:.

This may come in handy when phone is in our pocket. heheh

Anyways, Thanks for this one.

Yep would be great to have long press on prev/next on headset to control volume ;) thank you for great work looks very good
 

thekoRngear

Senior Member
Jul 25, 2012
727
231
Thanks man for this handy module. However I cannot make my S3's capacitive Menu and/or Back buttons work to pause the music. It works flawlessly with other buttons. Another thing is if I made the home button to play/pause the music I just cannot use the Home button to wake the phone up whether the headphones are plugged in or not and in any other state.
 

Inuyashaxp

Member
Dec 23, 2010
9
0
Poorly it don't work on my HTC Desire S with Android 4.03
By pressing the volume up and down button still the volume change only.
Framework installed, module activated in framework and restarted twice. Don't work :(
 

czechu01

Senior Member
Dec 8, 2012
186
43
London
Hey man! Nice work! Works on stock HTC One music app. But unfortunately doesn't work with spotify. Is it possible to do something with it? Also because One doesn't have camera button or physical menu/home/back button would it be possible to set any activity for a soft key? Another thing - would be really nice to be able to set the default music player to work with your module.
Anyways, thank you for your work!

Wysłane z mojego HTC One przy użyciu Tapatalka

---------- Post added at 01:55 PM ---------- Previous post was at 01:52 PM ----------

Poorly it don't work on my HTC Desire S with Android 4.03
By pressing the volume up and down button still the volume change only.
Framework installed, module activated in framework and restarted twice. Don't work :(

Did you set the key hold time for each button? You have to hold volume button in order to make any change.

Wysłane z mojego HTC One przy użyciu Tapatalka
 
Last edited:

esgie

Senior Member
Feb 17, 2013
332
179
Thank u for this useful mod.
In my opinion, it'd be nice to add an option, which is not directly related to media control, but surely concerns the extended usability of the hardware buttons: the possibility of controlling the pointer in the text fields with volume buttons just, like they were keyboard arrows (left/right or right/left, depending on i.e. user choice / hardware buttons placement / current screen rotation... ).
Similiar mod has been included in Xblast Tools (btw it is the only Xblast mod which I really use, would be great if I can finally uninstall whole Xblast)...
That one makes writing much lot easier, believe me, as you do not have to aim with your finger at 1mm gap between letters if you find out that you made a mistake, which - at least for me - is the one of the most annoying issues of touch screens (and on-screen keyboard apps...) in general.
I find it a good idea, as the mods related to a greater utilization of hardware buttons would be aggregated in one xposed module, then.

Would be glad if you at least consider above idea ;]

Thx for a great job.
 

Xspeed

Senior Member
Nice work man!
Work's like a charm on my Note 2.
But I have an question:
I currently have two media players (BeyondPod for podcasts, Poweramp for music) and I can't control the BeyondPod music player with this module.
Could you please make that module 'remember' which player I used the last time or/and set which player can be controlled with your app?
That would really make the app even more awesome and useful because I currently listen to a lot of podcast and would like to control it with your app.
Keep the great work on!
I'm afraid that's not possible, as this mod is only sending the media signals and it's up to the phone how to handle them.

doesn't work yet.i've attached the xposed debug log,if it helps you.
Yeah, I really don't have a <4.0 phone, but this time I've thoroughly compared the APIs and it seems I've underestimated the differences. Next version will surely work, but it's gonna take a while.

This apps sounds good and will be a replacement of heaset button controller...

then request from me :

• ability to use call/uncall from headset (maybe already work but only read news from Portal)
• ability to manage sound when headset is enable (like when music start, sound start @ 20%)
• ability to use TTS to know who call you, like read name is available
• ability to bypass longress on HTC and 4.x android rom (google now )

And if you can do that, i will be happy to make you a prez and icon app... deal or not ??
I don't really get what you meant by "sound start @ 20%", but about the rest... this mod is supposed to control the media only. Sorry.

Can you also add the headset button(s) as a set of key? if possible. :fingers-crossed:.

This may come in handy when phone is in our pocket. heheh

Anyways, Thanks for this one.
Yeah, it's totally going to be added. But, as I see in the Android API, headsets have only one button?

Yep would be great to have long press on prev/next on headset to control volume ;) thank you for great work looks very good
Headsets can have multiple buttons? It that headset USB or what?

Thanks man for this handy module. However I cannot make my S3's capacitive Menu and/or Back buttons work to pause the music. It works flawlessly with other buttons. Another thing is if I made the home button to play/pause the music I just cannot use the Home button to wake the phone up whether the headphones are plugged in or not and in any other state.
Well, those buttons were requested for phones that didn't have a camera key. The keys are working ONLY when they are physical (as the title suggests). As for the home key, my phone don't have a physical home key, so I'll need to investigate more thoroughly to find the cause.

Poorly it don't work on my HTC Desire S with Android 4.03
By pressing the volume up and down button still the volume change only.
Framework installed, module activated in framework and restarted twice. Don't work :(
Hey, yes I did it. I use Poweramp, does it depends on the music app?
It seems that it does depend on the way the app handles the media signals. If it doesn't at all, then it won't work.

Thank u for this useful mod.
In my opinion, it'd be nice to add an option, which is not directly related to media control, but surely concerns the extended usability of the hardware buttons: the possibility of controlling the pointer in the text fields with volume buttons just, like they were keyboard arrows (left/right or right/left, depending on i.e. user choice / hardware buttons placement / current screen rotation... ).
Similiar mod has been included in Xblast Tools (btw it is the only Xblast mod which I really use, would be great if I can finally uninstall whole Xblast)...
That one makes writing much lot easier, believe me, as you do not have to aim with your finger at 1mm gap between letters if you find out that you made a mistake, which - at least for me - is the one of the most annoying issues of touch screens (and on-screen keyboard apps...) in general.
I find it a good idea, as the mods related to a greater utilization of hardware buttons would be aggregated in one xposed module, then.

Would be glad if you at least consider above idea ;]

Thx for a great job.
Maybe I could start another mod for handling physical buttons for other purposes, yes, but this mod is supposed to be media control only. Sorry.
 

killoid

Senior Member
Feb 5, 2013
1,266
442
Last edited:
  • Like
Reactions: pathaniya

Kalaidos

Senior Member
Dec 2, 2013
65
6
Gravitybox does have this feature too but somehow it didnt work on my LG G2..

Your mod works great and im happy, thanks :good:
 

ahm.elghazaly

Senior Member
Dec 22, 2012
114
10
Will it be possible to add pressing both volume up and down to simulate play/pause? I have an HTC one so no keys at all. Thanks
 

Blizzard22

Senior Member
Jun 7, 2010
451
75
Redmi Note 10 Pro
I'm afraid that's not possible, as this mod is only sending the media signals and it's up to the phone how to handle them.


Yeah, I really don't have a <4.0 phone, but this time I've thoroughly compared the APIs and it seems I've underestimated the differences. Next version will surely work, but it's gonna take a while.


I don't really get what you meant by "sound start @ 20%", but about the rest... this mod is supposed to control the media only. Sorry.


Yeah, it's totally going to be added. But, as I see in the Android API, headsets have only one button?


Headsets can have multiple buttons? It that headset USB or what?


Well, those buttons were requested for phones that didn't have a camera key. The keys are working ONLY when they are physical (as the title suggests). As for the home key, my phone don't have a physical home key, so I'll need to investigate more thoroughly to find the cause.



It seems that it does depend on the way the app handles the media signals. If it doesn't at all, then it won't work.


Maybe I could start another mod for handling physical buttons for other purposes, yes, but this mod is supposed to be media control only. Sorry.

If I disable the headset controls for Poweramp BeyondPod starts and works great with your mod.
But of course I use my headset controls for Poweramp =/.
Well at least I have found an workaround for this problem.
 

lesscro

Senior Member
Jul 16, 2007
4,486
2,266
Paris
I don't really get what you meant by "sound start @ 20%", but about the rest... this mod is supposed to control the media only. Sorry.

hi, thx for answer... anyway i m talking about when you plugged headset sound is reset to a specific level... then you can manage to start volume to 20,30,40,50,60,70,80,90 or 100... really usefull tweaks...

cheers
 

Xspeed

Senior Member
Will it be possible to add pressing both volume up and down to simulate play/pause? I have an HTC one so no keys at all. Thanks
I'm going to add the power button instead as a possible button.

hi, thx for answer... anyway i m talking about when you plugged headset sound is reset to a specific level... then you can manage to start volume to 20,30,40,50,60,70,80,90 or 100... really usefull tweaks...
cheers
So, when the music starts the volume is set to a specified level? I think I can do that.
 

ahrion

Retired Forum Moderator / Recognized Developer
Jul 19, 2013
3,101
5,128
I'm going to add the power button instead as a possible button.


So, when the music starts the volume is set to a specified level? I think I can do that.

Please add search button instead of camera..

Sent from my Optimus G Pro using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 128
    Hi
    I am presenting you here a Xposed module allowing you to take full control over the keys in your device!

    When the screen is off/locked/on this module allows you to:
    - send media play signals
    - send media next/previous signals
    - send volume up/down signals
    - launch app shortcut actions
    - simulate key presses
    ...with any buttons your phone might have!

    And also:
    - Disable original button functions
    - Send a play signal when devices get plugged in
    - Send signals only when selected devices are plugged in
    - Set music volume when play signals are sent
    - Set a media player to send the signals to
    - Launch the selected player before sending signals

    Features can be greatly customized to suit all possible needs!
    Compatible with all Android versions from 7.1 to 12.

    Download: Physical Button Master Control on Xposed Module Repository
    If you found this mod useful consider donating me a coffee, this will help me code ^^

    If you want to help other people see this app in your language, feel free to contribute on CrowdIn:
    PBMC translation project on CrowdIn

    How to report problems efficiently?
    - Enable the 'Debug log' in PBMC settings
    - Use PBMC functions that don't work as intended
    - Export the logs from Xposed app and put them on PasteBin
    - Post here/send me the link along with more information about your device

    Source Code: https://github.com/XspeedPL/PhysicalButtonMod
    14
    4.0 beta

    After almost one year break here it is.
    The new promised version you (I hope) have been waiting for!

    HOWEVER! It's an beta version! What does that mean?
    - Translations are unavailable at the moment
    - Bugs may appear (orly?)

    This release is mainly for people wanting to help by testing or not minding bugs.
    I cannot guarantee stability of this alpha version.

    OK, OK, what is new?
    Proper Marshmallow support!
    And... pretty much everything else :silly:

    I don't understand how this new version works at all. Help?
    Well, 4.0 in it's beta stage has no help or guide built-in, as I am focusing on adding features and fixing bugs.
    Here's some quick overview about the mechanism:
    PBMC works now by recognizing keypress patterns, aka. key chains.
    You can use complex mixed key combinations to do many different tasks with minimal amount of different buttons.

    How do I just make a simple double press or press and hold?
    To, in example, set a double press of Volume Up button make a key chain with keys like this:
    Volume Up pressed, Volume Up released, Volume Up pressed, Volume Up released
    And to get a click and hold:
    Volume Up pressed, Volume Up released, Volume Up pressed time 0.3sec

    'I mapped a key, and now I can't use it normally!'
    Well, you need to make another chain to emulate original key functions.
    Example:
    Code:
    Chain Media next - action 'Next media', keys: Vol Up Pressed Delay 0.5s
    Chain Original vol up - action 'Keypress (Volume up)', keys: Vol Up Pressed, Vol Up Released
    That way when you hold the volume key it will execute media next, and if you just tap it, it will execute original vol up.

    'I can't get double/triple press to work with single press also set!'
    Answer is simple: put a delay (even 0.2s) on the single press chain.
    The reason for that is when there is no delay and you try to double press, PBMC does an action immediately after the first press, because it waits 0 seconds before checking for any other chains.

    Oh right, and here are a few other useful tips (Courtesy of @quantemplation, cheers mate!)
    • Remember to use unique names for your chains (one will override another of the same name)
    • If you use "Cancels original key functions" on your chain, it naturally follows that you have to map the default function of the key to an additional chain to be able to use it
    • To get a long button press effect, as on previous versions, put the relevant delay (aka hold time) on a "Pressed" key in the chain
    • To have a combination such as triple tap, while still allowing a double tap chain, you need to put your a delay on the last key of the double tap chain. Basically, the delay on the release is how much time it waits until that combination fires your intended action. If there's no delay, there's no physical way to get to any chain longer than that one!
    • Don't map the power and home keys, unless you really know what you're doing
    • Remember that there cannot be multiple consecutive 'Pressed' or 'Released' keys, because you can't press a key twice without releasing it once, right? Heh
    11
    Frequently Asked Questions

    Q: Simply doesn't work?
    A: Make sure your device is rooted, Xposed Installer is installed, and PBMC is enabled within the module menu of Xposed. After this, reboot. If it still doesn't work proceed to next steps (such as posting debug logs).

    Q: I just installed PBMC and I found out that my home/recents/back/power button cannot be mapped. Fix?
    A: You need to reboot first. With the module active, all buttons will work.

    Q: Can I use this module to disable original button functions?
    A: Yes, you can do this by setting the 'Do nothing' action on a mapping.
    In example, to prevent volume up button from increasing the volume, set it's 'Single press' action to 'Do nothing'.

    Q: How can I disable vibrations?
    A: When you add an action, you can move the "Use vibration" slider to 0ms. It's as simple as that.

    Q: I used the option to hide the app from the launcher, how can I open it now?
    A: Go to the Xposed Installer -> Modules -> click on the PBMC module to open it.

    Q: I have set a single-press action to my home/power button. How can I wake the device up now?
    A: It's quite simple, any unmodified action will act as the original button function. Double-press or hold, depending on which ones have you not set.

    Q: My media player is starting delayed using PBMC, why is that happening and what can I do?
    A: It's because of the OOM killer most of the times, it's a mechanism in Android that kills unactive apps.
    You see, when the receiver app is already active, it handles signals instantly.
    But, when it has to be started (media players can get killed when it isn't playing anymore), it can take longer, depending on available RAM and amount of tasks running in the background.
    So, what can you do? There are ways of protecting apps from getting killed by OOM killer. You could also limit the number of tasks running in the background (to make sure there is some RAM free).

    Q: I have a problem that isn't listed here. What do I do?
    A: You can use the 'Feature Requests' and 'Bug Reports' sections on top or post your problem on this thread, BUT remember to provide useful information, like: device info, Xposed/LogCat logs, list of other modules, detailed steps to reproduce the problem. Refer to the first post for instructions on getting Xposed logs.
    9
    After tons of days (of lazy days), the release is getting close!
    More information coming soon.
    9
    @Senliast @Airtioteclint @ToyKiller
    Do not worry, closed beta tests are under way.
    Once everything is polished out, release will be complete.

    That being said, if you have any experience in UI/UX and are able to provide constructive feedback you can PM me for an invitation to the closed beta.