Re: [android-developers] Detecting hardware button on Android mobile

2013-09-03 Thread Ash
I have a feeling what you mentioned is the case. I have implemented functions onKeyUp(...), onKeyDown(...). None of these functions get called when I press the PTT button. Unfortunately the phone is not rooted so there are not many options. Thanks for your input. On Monday, 2 September 2013 23

Re: [android-developers] Detecting hardware button on Android mobile

2013-09-02 Thread Harsh Vardhan
If you are not able to catch the key event, in all probabilities, this PTT key has been handled before it reaches to the window in focus. PhoneFallbackEventHandler or PhoneWindowManager, one of them is not your friend and is holding back the event. You will require a custom firmware for your phone

Re: [android-developers] Detecting hardware button on Android mobile

2013-09-02 Thread Jadranko Bodiroga
try replace this : KEYCODE_CALL On Fri, Aug 30, 2013 at 11:53 PM, Ash wrote: > The code you have given is to detect the Power button. I want to detect > the PTT (push-to-talk) button. > > > On Friday, 30 August 2013 23:01:01 UTC+10, baturanija1 wrote: > >> add permission : >> >> >> On Fri, Aug

Re: [android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Ash
The code you have given is to detect the Power button. I want to detect the PTT (push-to-talk) button. On Friday, 30 August 2013 23:01:01 UTC+10, baturanija1 wrote: > > add permission : "android.permission.PREVENT_POWER_KEY" /> > > > On Fri, Aug 30, 2013 at 3:00 PM, Jadranko Bodiroga < > jadrank

Re: [android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Jadranko Bodiroga
add permission : On Fri, Aug 30, 2013 at 3:00 PM, Jadranko Bodiroga < jadrankobodiroga1...@gmail.com> wrote: > something like this maybe: if (event.getKeyCode() == KeyEvent. > KEYCODE_POWER) {} > > > > On Fri, Aug 30, 2013 at 1:06 PM, Ash wrote: > >> Hi All, >> >> I have a mobile phone from R

Re: [android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Jadranko Bodiroga
something like this maybe: if (event.getKeyCode() == KeyEvent.KEYCODE_POWER ) {} On Fri, Aug 30, 2013 at 1:06 PM, Ash wrote: > Hi All, > > I have a mobile phone from Runbo ( > http://www.runboruggedphones.com/shop/buy-runbo-x5-ip67-rugged-waterproof-smartphone.html > ). > > It has a 3 additio

[android-developers] Detecting hardware button on Android mobile

2013-08-30 Thread Ash
Hi All, I have a mobile phone from Runbo ( http://www.runboruggedphones.com/shop/buy-runbo-x5-ip67-rugged-waterproof-smartphone.html ). It has a 3 additional buttons which I have not seen on normal Android phones. These are PTT, SOS and ET. I was able to detect the SOS and ET button using the