getPressedButton

This function tells us which button was pressed on the watch to initiate the connection. Remember, the connection between the phone and the watch can only be initiated from the watch.

The return values are interpreted as follows:

  • LOWER_LEFT - this connection is initiated by a long-press of the lower-left button on the watch. The app receiving this type of connection can now send and receive commands to the watch.

  • LOWER_RIGHT - this connection is initiated by a short-press of the lower-right button, which is usually used to set time. But the app can use this signal to perform other arbitrary functions. Therefore, this button is also referred as ACTION BUTTON. The connection will automatically disconnect in about 20 seconds.

  • NO_BUTTON - this connection is initiated automatically, periodically from the watch, without user input. It will automatically disconnect in about 20 seconds.

This function is relatively expensive, since it performs round trip to the watch to get the value. Therefore, it should be called only once each time the connection is established. The returned values will not change for the duration of the connection. After that, the user can call one of these lightweight functions:

isActionButtonPressed

isNormalButtonPressed

isAutoTimeStarted

Return

BluetoothWatch.WATCH_BUTTON