Bruca Petre ion
Bruca Petre ion

Reputation: 1

Answer or end call by pressing the physical buttons on Wear watch

Hello in the native settings of the Galaxy Watch 4/5/6 and Google watch 1/2 there is no option available to answer or end call by pressing the physical buttons.i what to build an app which i can answer end a call by pressing physical buttons. I need a good developer who can point me in the right direction, for example with java. Perhaps this can be done by modifying the code for what is needed.

@Override
// Activity
public boolean onKeyDown(int keyCode, KeyEvent event){
  if (event.getRepeatCount() == 0) {
    if (keyCode == KeyEvent.KEYCODE_STEM_1) {
      // Do stuff
      return true;
    } else if (keyCode == KeyEvent.KEYCODE_STEM_2) {
      // Do stuff
      return true;
    } else if (keyCode == KeyEvent.KEYCODE_STEM_3) {
      // Do stuff
      return true;
    }
  }

  return super.onKeyDown(keyCode, event);
}

Upvotes: 0

Views: 38

Answers (0)

Related Questions