1

I've got new mobile from ebay, Blackview bv6000, which has 3 special physical buttons

  1. Camera
  2. Sos
  3. Ptt

Then i need to assign those buttons to run my app and some functions

I got stock rom from Blackview forum, after i extract system.img file and found

\usr\keylayout\Generic.kl 

which contains list of key function that i need

key 212   CAMERA

...

#[AGOLD][2015.04.08]Fengjun merge
key 249   FUNC1
key 250   FUNC2
#[AGOLD]End

The question is how can i assign that key to run my app or function in my app?

Edit

More info:

I want to catch button event in home screen or in other app or even the screen is off

bitto bitta
  • 31
  • 1
  • 6

2 Answers2

0

Look into KeyEvent which is shown in an functioning example in this answer. For the specific keys, check out https://developer.android.com/reference/android/view/KeyEvent.html

For example, KEYCODE_CAMERA for the camera button.

Community
  • 1
  • 1
Jack Ryan
  • 1,287
  • 12
  • 26
  • That link you had provided can use when i press those button in my app but i need to use it when i'm at home screen. I've edited my post for more information. Btw thanks for quick reply – bitto bitta Jul 06 '16 at 04:32
0

In my company we have been searching for this for a while and finally I have an answer.

We have recently contacted with the BV6000 main provider and they told me that those buttons can only be overrided by customizing the hardware specifically for your app and that they require a 500+ phones commercial order to start the procediment of customizing something.

They won't move a finger neither give any documentation for less than that :-/

Zinc
  • 1,002
  • 12
  • 18