Package com.microej.wear.services
Interface DeviceService
-
public interface DeviceServiceThis service allows Features to get device information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetBatteryLevel()Returns the current battery level.StringgetDeviceBluetoothAddress()Returns the Bluetooth address of the device.StringgetDeviceName()Returns the name of the devicebooleanisBatteryCharging()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:
trueif the battery is charging,falseif it is not charging.
-
getDeviceName
String getDeviceName()
Returns the name of the device- Returns:
- the name of the device
-
getDeviceBluetoothAddress
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
-
-