Reputation: 21778
My android watch has a single hardware (physical) button on the side. Is it possible to program a listener for this button, so that it can be used as an additional control in my program?
Upvotes: 0
Views: 684
Reputation: 6635
I don't believe this is possible. The usual way to detect a standard button press (like Back) in Android is with an onKeyDown
listener, and this doesn't fire in an Activity
on Wear when the stem button is pressed (tested on both Wear 1.5 and the 2.0 dev preview).
It's always iffy to assert something is categorically not possible, because there's always the chance that someone will find a clever hack to make it happen. And I wouldn't mind being proved wrong. But until such a hack comes along, I'm going to say no, it's not.
Upvotes: 2