[Q] TianHe h920+ and wired headset controls - Android Q&A, Help & Troubleshooting

I recently purchased the TianHe h920+, a Chinese phone that seems to be nearly the exact same as the Mlais MX58 pro, among others. My issue is that my wired one button headset does not work properly with controlling my device. Long presses do not launch Google Now, and two/three repeated presses do not active next song/previous song with music players. This headset works fine with my old Samsung Captivate, so it's not the headset's problem, but the phone's.
After some digging, I installed the KeyTest app, and it turns out that two key presses are registered when the button is pressed down, scanCodes 88 and 164. scanCoe 88 apears first, followed by a registering of scanCode 164 after a second or two. Holding down the button first triggers scanCode 88, and occasionally scanCode 166. However, the little counter for "repeatCount" does not tick up, unlike when I hold down the capactive back or menu keys, or the volume rocker. After much more digging, I finally found the key layout file that the phone uses, and was able to remap 164 from MEDIA_PLAY_PAUSE to MEDIA_NEXT, which in turn let me use the Headset Button Controller app.
But the problems don't end there. Even after commenting out scanCode 88 with a "#", Android still recognizes that scanCode 88 is pressed when the button is pushed down, and this interrupts the repeated key presses, as well as press and hold functions of Headset Button Controller. Anyone have any ideas?

Related

MP3 player with hold function

Does anyone know of an mp3 player that has a hold function where tapping the screen won't work or a player that will still work after my sx56 is turned off. Also I bought the cheap earbud headphones off AT&T's website. Is there anyway to map the answer phone button to have other functions (such as next track).
I asked a very similar question in these forums recently, and got the perfect answer: WMP already allows you to lock the screen.
In the player, go to Tools -> Settings -> Buttons and map 'Screen toggle' to one of your hardware buttons. (I mapped it to the 'Action' button - the centre of the cursor.) Now, when I press this button while WMP is playing, the screen is turned off and locked.
Hope this helps.
otherwise winampaq
mapping the button on my earpiece
Is there anyway I can map the answer call button on my earpiece to goto the next track. I keep my sx56 in my pocket and it is annoying to have to reach in to hit the next track. Also when I am wearing the earbuds it would be nice to have the answer call button a mappable button. Thanks.
great, but not quite there
it's a great improvement, which does indeed disable the screen, but not the buttons.
I'd just like some kind of lock that disables both the screen and the keys, a la nokia phones.
cheers
M

[Q] Volume rocker behaves erratically

Something is definitely wrong with my rocker button.
When I pressed the volume up button, couple things happen:
- volume increases
- google search opened up
When I pressed the volume down button:
- goes back to home menu
- volume decrease (if I pressed longer), as well as the recent program popped up.
I tried downloading RingGuard and volume control widget, only block the sound but the rest of the actions are still executed.
It seems like when I pressed the volume up button (using KeyNumberTracker), key
115 (volume up)
217 (search)
139 (menu)
are pushed.
This just happen suddenly this morning. Is there any way to fix this?

[Q] Camera Button is Acting Funny

I'm not sure what the cause of it is, but perhaps you guys can help me out.
I've had my Optimus V for a while now and have flashed IHO-backside to it in December.
Recently, my camera button has been acting very strange. You see, it still functions as a camera button. Holding it down (completely) will launch the right app, hold it down (loosely) focuses the camera, and pressing it down completely will take a snapshot. That's all fine and dandy.
However... When I'm not in a camera app the camera button takes on a different set of functions. For some reason, lightly touching the button triggers a Volume Up, Volume Down, and/or Voice button press. I'm not sure why this happens. It's very strange. If you even so much as to come to physical contact with the button, it will send those "button presses" above. Clicking the button still works correctly, though.
I went into the ClockworkMod recovery to double check the key presses for it. It was VERY difficult because pressing the camera button to select an option will trigger the Vol up, Vol down and Voice presses making me select the wrong options in the recovery menu. Anyway, the following gets returned when lightly tapping the camera button:
key 115, key 114, key 216. (Vol up, Vol down, and Voice)
I checked the key file located here: /system/usr/keylayout/thunder_keypad.kl and found that everything is still mapping to the right buttons.
Can someone please tell me what's going on and how to make it stop doing this?
Anyone?

How to get Volume buttons to wake phone in Lolipop (CM12.1)?

Edit: this is no longer an issue in CM13.0 snapshot. I went ahead and upgraded and can confirm volume rocker wake (and double tap to wake) work.
Hi All I'm on CM12.1 (MT2L03 cm-12.1-20151117-SNAPSHOT-YOG7DAO1K2-mt2) and can't seem to figure this out. I had the volume buttons waking the phone from screen off in 4.3 working great...I used that for quite a while (since I used the option to end calls with power button need volume buttons to wake screen also saves wear to power button) so the hardware supports it but not sure how to get it working on lolipop (CM12.1).
In Jellybean, I just had to add 'WAKE' after the volume keys like:
key 115 VOLUME_UP WAKE (in /system/user/keylayout to the kl files)
I tried this for CM 12.1 and it doesn't seem to work. Since it worked before I suppose it could work again if a setting is changed or something.
Also I tried adding:
ro.config.hwfeature_wakeupkey=1
to my build.prop and rebooting and that didn't work either. (Setting it to 0 disables volume key waking)
The xposed module XUtilities option: Volume rocker wake also did not work.
The xposed module GravityBox doesn't have the option or I didn't see it there.
There's this reference:
http://cyanogenmod.github.io/cm_pla...ers/CMSettings.System.html#VOLUME_WAKE_SCREEN
which refers to VOLUME_WAKE_SCREEN setting (in CM API)
In the Buttons section of CM's settings, I have the End call (Pressing the power button will end the current call) option ON. One would think this would allow the volume buttons to wake the screen if the screen goes off during a phone call so you can wake it back up without ending the call. Also with this option on, on more than one occasion I went to turn my phone on just as an incoming call came in and used the power button which ended the call...so I've gotten in the habit of using the volume up/down buttons to turn on the screen getting around that issue (also saving wear and tear on my power button).
There's an app in the play store that can do what I want called DTSO (fails after time) VPL by prasi but it stays running and uses more battery power. The hardware solution that was working in 4.3 didn't require a background app to allow this feature and also didn't require extra battery power. So this isn't ideal. I'd rather have Cyanogenmod ROM directly support it or have a way to use it with it.
I want to be able to press the volume buttons and the screen come on like it used to. How?
Thank you for any suggestions :fingers-crossed::good:

Advanced button remapping

My Samsung Galaxy A3 2016 only boots in safe mode because the volume down button was damaged by water. Upon further usage I discovered that by pressing it even once the phone believe that I’m holding it down and, for some reason, after I do it the power button does not respond. I thought I had the solution and I tried editing the Generic.tar file found in /sysyem/usr/keylayout/:
key 113 VOLUME_MUTE
# key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER
key 117 NUMPAD_EQUALS
Indeed, the volume down button was being disabled and I was greeted by the normal OS (confirming that the safe mode is triggered by volume down being pressed). The only problem was that also all the others physical buttons weren’t working (not the softkeys). Disabling any other button works as intended.
It is worth saying that, even though the power button does not work after I press volume down, in LineageOS if I double tap it the camera application starts as programmed (long and short presses don’t work -> adb reboot). This in my opinion suggests that although the problem is in the hardware it can be bypassed via software somehow.
Generic apps found in play store of course won’t do the job. I had tried with the repair service and they said that the damage is in the motherboard, and it’s not worth the money.
I’m out of idea but this is becoming a matter of principle and I’m not willing to let a piece of silicon win. Can you please help me with this problem?
bump

Categories

Resources