Connect IQ > APIメモ > Toybox > System > DeviceSetting

下位ページ

Content

Class: Toybox::System::DeviceSettings


Overview

DeviceSettings is a class used to represent various settings on the device.

Since:

   1.0.0

Instance Attribute Summary

(collapse)

   - (Boolean) activityTrackingOn

   True if activity Tracking is enabled on the device.
   - (Number) alarmCount

   The number of alarms set to go off on the device.
   - (Number) distanceUnits

   UNIT_METRIC if distance is shown in kilometers, UNIT_STATUTE if it is shown in miles.
   - (Number) elevationUnits

   UNIT_METRIC if elevation is shown in meters, UNIT_STATUTE if it is shown in feet.
   - (Array) firmwareVersion

   Get the current firmware version as a two entry array [ major, minor ].
   - (Number) heightUnits

   UNIT_METRIC if height is shown in meters, UNIT_STATUTE if it is shown in feet.
   - (Number) inputButtons

   Enumerate if Select/Up/Down/Menu buttons are supported using the BUTTON_INPUT_XXXX enum values.
   - (Boolean) is24Hour

   True if unit shows 24 hour units, false if it displays 12 hour.
   - (Boolean) isTouchScreen

   Does this unit have a touch screen?.
   - (Array) monkeyVersion

   Get the CIQ version as a three entry array [major, minor, micro ].
   - (Number) notificationCount

   The number of active notifications.
   - (Number) paceUnits

   UNIT_METRIC if pace is shown in kilometers/hour, UNIT_STATUTE if it is shown in miles/hour.
   - (String) partNumber

   Get the part number for this product as a string.
   - (Boolean) phoneConnected

   True if a mobile phone is connected to the device, false otherwise.
   - (Number) screenHeight

   The height of the screen in pixels.
   - (Number) screenShape

   SCREEN_SHAPE_XXXX enum value that describes the screen shape.
   - (Number) screenWidth

   The width of the screen in pixels.
   - (Number) temperatureUnits

   UNIT_METRIC if temperature is shown in Celsius, UNIT_STATUTE if it is shown in Fahrenheit.
   - (Object) tonesOn

   True if tones are enabled on the unit, false if they are disabled return [Boolean].
   - (Boolean) vibrateOn

   True if vibration is enabled on the unit, false if it is disabled.
   - (Number) weightUnits

   UNIT_METRIC if weight is shown in kilograms, UNIT_STATUTE if it is shown in pounds.

Instance Attribute Details

(Boolean) activityTrackingOn


True if activity Tracking is enabled on the device

Returns:
   (Boolean)

Since:
   1.2.0

(Number) alarmCount


The number of alarms set to go off on the device

Returns:
   (Number)

Since:
   1.2.0

(Number) distanceUnits


UNIT_METRIC if distance is shown in kilometers, UNIT_STATUTE if it is shown in miles

Returns:

   (Number)

Since:

   1.0.0

(Number) elevationUnits


UNIT_METRIC if elevation is shown in meters, UNIT_STATUTE if it is shown in feet

Returns:

   (Number)

Since:

   1.0.0

(Array) firmwareVersion


Get the current firmware version as a two entry array [ major, minor ]

Returns:

   (Array)

Since:

   1.2.0

(Number) heightUnits


UNIT_METRIC if height is shown in meters, UNIT_STATUTE if it is shown in feet

Returns:

   (Number)

Since:

   1.0.0

(Number) inputButtons


Enumerate if Select/Up/Down/Menu buttons are supported using the BUTTON_INPUT_XXXX enum values

Returns:

   (Number)

Since:

   1.2.0

(Boolean) is24Hour


True if unit shows 24 hour units, false if it displays 12 hour

Returns:

   (Boolean)

Since:

   1.0.0

(Boolean) isTouchScreen


Does this unit have a touch screen?

Returns:

   (Boolean)

Since:

   1.2.0

(Array) monkeyVersion


Get the CIQ version as a three entry array [major, minor, micro ]

Returns:

   (Array)

Since:

   1.2.0

(Number) notificationCount


The number of active notifications

Returns:

   (Number)

Since:

   1.2.0

(Number) paceUnits


UNIT_METRIC if pace is shown in kilometers/hour, UNIT_STATUTE if it is shown in miles/hour

Returns:

   (Number)

Since:

   1.0.0

(String) partNumber


Get the part number for this product as a string

Returns:

   (String)

Since:

   1.2.0

(Boolean) phoneConnected


True if a mobile phone is connected to the device, false otherwise

Returns:

   (Boolean)

Since:

   1.1.0

(Number) screenHeight


The height of the screen in pixels

Returns:

   (Number)

Since:

   1.2.0

(Number) screenShape


SCREEN_SHAPE_XXXX enum value that describes the screen shape

Returns:

   (Number)

Since:

   1.2.0

(Number) screenWidth


The width of the screen in pixels

Returns:

   (Number)

Since:

   1.2.0

(Number) temperatureUnits


UNIT_METRIC if temperature is shown in Celsius, UNIT_STATUTE if it is shown in Fahrenheit

Returns:

   (Number)

Since:

   1.0.0

  • (Object) tonesOn

True if tones are enabled on the unit, false if they are disabled return [Boolean]

Since:

   1.0.0

  • (Boolean) vibrateOn

True if vibration is enabled on the unit, false if it is disabled

Returns:

   (Boolean)

Since:

   1.0.0

(Number) weightUnits


UNIT_METRIC if weight is shown in kilograms, UNIT_STATUTE if it is shown in pounds

Returns:

   (Number)

Since:

   1.0.0

Class: Toybox::System::Stats


Inherits:
   Object
   show all

Overview

Stats is a class to hold various system stats.

Since:

   1.0.0

Instance Attribute Summary
(collapse)

   - (Float) battery

   Battery life remaining in percent (between 0.0 and 1.0).
   - (Number) freeMemory

   Free memory in bytes.
   - (Number) totalMemory

   Total available memory in bytes.
   - (Number) usedMemory

   Memory used by this application in bytes.

Instance Attribute Details
  • (Float) battery

Battery life remaining in percent (between 0.0 and 1.0)

Returns:

   (Float)

Since:

   1.0.0

  • (Number) freeMemory

Free memory in bytes

Returns:

   (Number)

Since:

   1.0.0

  • (Number) totalMemory

Total available memory in bytes

Returns:

   (Number)

Since:

   1.0.0

  • (Number) usedMemory

Memory used by this application in bytes

Returns:

   (Number)

Since:

   1.0.0
最終更新:2016年03月02日 23:51