juno.device¶
Device information and haptic feedback.
- class juno.device.DeviceInfo(model, name, system_name, system_version, is_pad)¶
Bases:
objectBasic metadata reported by the active iOS device.
- class juno.device.ScreenSize(width, height, scale)¶
Bases:
NamedTupleScreen dimensions in points and pixel scale.
- juno.device.info()¶
Return basic metadata for the current device.
- Returns:
A
DeviceInfopayload describing model, name, and system version.- Return type:
- juno.device.screen_size()¶
Return screen dimensions in points and pixel scale.
- Returns:
A
ScreenSizetuple withwidth,height, andscale.- Return type:
- juno.device.battery_level()¶
Return normalized battery level.
- Returns:
Value in
[0.0, 1.0]when available, or-1.0when unavailable.- Return type:
- juno.device.is_dark_mode()¶
Return whether the current interface style is dark.
- Returns:
Truewhen dark mode is active, otherwiseFalse.- Return type:
- juno.device.locale()¶
Return the current locale identifier.
- Returns:
Locale identifier string such as
"en_US".- Return type:
- juno.device.haptic_impact(style='medium')¶
Trigger an impact haptic.
- Parameters:
style (str) – Impact style, one of
light,medium,heavy,soft, orrigid.- Raises:
TypeError – If
styleis not a string.ValueError – If
styleis not supported.
- Return type:
None
- juno.device.haptic_notification(type='success')¶
Trigger a notification haptic.
- Parameters:
type (str) – Notification type, one of
success,warning, orerror.- Raises:
TypeError – If
typeis not a string.ValueError – If
typeis not supported.
- Return type:
None
- juno.device.haptic_selection()¶
Trigger a selection-change haptic.
- Return type:
None