0

Is there in SDK Android Wear a Class representing a push-button (the push button on the side of the watch)

the push button on the side of the watch

If it's possible, can I assign a comportment and a method to this push-button, the push-button can be pressed, or clicked, by the user to perform an action.

I found this http://developer.android.com/reference/android/widget/Button. Html but I think this Class representing a button widget, not what I want

Nick Klauer
  • 5,893
  • 5
  • 42
  • 68
Bertrand
  • 341
  • 1
  • 2
  • 12
  • 1
    The link you provided is for the button UI element. This is only an assumption (hence why this is not an answer), but that button is probably the power button, and the only way to mess with the power button functionality in android is to mess with system files. – SilverCorvus Feb 19 '15 at 00:17
  • Plus, none of these watches are Android Wear devices. And this question has already been asked here: http://stackoverflow.com/questions/28568015/can-android-wearable-apps-detect-the-power-button-as-a-keyevent – Nicolas POMEPUY Feb 19 '15 at 06:42

1 Answers1

1

No, there is no way (at this point) to override action for power off button. Also as CurlyCorvus and Nicolas mentioned you provided link to UI Button (not hardware one) class, and you provided screens with non-Android Wear devices.

Michał Tajchert
  • 10,333
  • 4
  • 30
  • 47