Package com.microej.wear.services
Interface DeviceService
-
public interface DeviceService
This service allows Features to get device information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getBatteryLevel()
Returns the current battery level.java.lang.String
getDeviceBluetoothAddress()
Returns the Bluetooth address of the device.java.lang.String
getDeviceName()
Returns the name of the deviceboolean
isBatteryCharging()
Returns whether the battery is currently charging.
-
-
-
Method Detail
-
getBatteryLevel
int getBatteryLevel()
Returns the current battery level.- Returns:
- the battery level (in %).
-
isBatteryCharging
boolean isBatteryCharging()
Returns whether the battery is currently charging.- Returns:
true
if the battery is charging,false
if it is not charging.
-
getDeviceName
java.lang.String getDeviceName()
Returns the name of the device- Returns:
- the name of the device
-
getDeviceBluetoothAddress
java.lang.String getDeviceBluetoothAddress()
Returns the Bluetooth address of the device. The address is a String following the standard Bluetooth MAC address format (e.g.,"00:1A:7D:DA:71:13"
).- Returns:
- the Bluetooth address of the device
-
-