public class SportsState
extends java.lang.Object
Constructor and Description |
---|
SportsState() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCustomLabel()
The custom label to show in the sports UI.
|
java.lang.String |
getCustomValue()
The custom value to show in the sports UI.
|
float |
getDistance()
The current distance in kilometers or miles.
|
byte |
getHeartBPM()
The current heart rate in beats per minute.
|
int |
getPaceInSec()
The current pace in seconds per kilometer or seconds per mile.
|
float |
getSpeed()
The current speed in kilometers per hour or miles per hour.
|
int |
getTimeInSec()
The current time in seconds.
|
void |
setCustomLabel(java.lang.String customLabel)
Set the custom label to show in the sports UI.
|
void |
setCustomValue(java.lang.String customValue)
Set the custom value to show in the sports UI.
|
void |
setDistance(float distance)
Set the current distance in kilometers or miles.
|
void |
setHeartBPM(byte heartBPM)
Set the current heart rate in beats per minute.
|
void |
setPaceInSec(int paceInSec)
Set the current pace in seconds per kilometer or seconds per mile.
|
void |
setSpeed(float speed)
Set the current speed in kilometers per hour or miles per hour.
|
void |
setTimeInSec(int timeInSec)
Set the current time in seconds.
|
void |
synchronize(android.content.Context context)
Synchronizes the current state of the Sports App to the connected watch.
|
public int getTimeInSec()
public void setTimeInSec(int timeInSec)
timeInSec
- The current time to set, in seconds.public float getDistance()
public void setDistance(float distance)
distance
- The current distance to set, in kilometers or miles.public int getPaceInSec()
public void setPaceInSec(int paceInSec)
paceInSec
- The pace to set, in seconds per kilometer or seconds per mile.public float getSpeed()
public void setSpeed(float speed)
speed
- The current speed to set, in kilometers per hour or miles per hour.public byte getHeartBPM()
public void setHeartBPM(byte heartBPM)
heartBPM
- The current heart rate to set, in beats per minute.public java.lang.String getCustomLabel()
public void setCustomLabel(java.lang.String customLabel)
customLabel
- The custom label to set.public java.lang.String getCustomValue()
public void setCustomValue(java.lang.String customValue)
customValue
- The custom value to set.public void synchronize(android.content.Context context)
context
- The context used to send the broadcast.