Watch buttons answer/ end calls

Hello i want to answer/end calls with physical buttons on samsung watch 4/5/6, I need buttons ID codes to develop an application, has anyone tried doing this? If yes, where can I find them? Thanks.

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);
}

Hello,
Galaxy watches 4/5/6 does not allow to modify the hardware keys from 3rd party applications.
These keys are considered to be the system keys and officially you cannot change its functionality.

Thanks
Shamima
Samsung Developer Program Team

1 Like

Thanks for your reply, you can put this as a feature request? is very important for people with disabilities. Thank you.
This because there is no root for watch 4 no combination file and SAMSUNG does not allow developers to implement this in app.

Hello,
Sorry for the convenience.
All policies of Samsung have been applied after lots of analysis. Samsung is very conscious about user experience. As far as I know, currently, there is no plan to allow system keys modification for 3rd party developers.

Thanks
Shamima
Samsung Developer Program Team