LynxSystemInfo
Device and platform facts, such as the screen size and the operating system. import { LynxSystemInfo } from '@blotch/angular-lynx';
Usage
src/app/device.ts
API
LynxSystemInfo
Reads Lynx's global SystemInfo. Lynx fills it in once when the page starts, so the values never change and aren't signals.
- Creating it throws outside Lynx, such as in unit tests.
LynxSystemInfo.platform
The platform, such as 'iOS' or 'Android'.
LynxSystemInfo.osVersion
The operating system's version.
LynxSystemInfo.engineVersion
The Lynx engine's version, such as '3.2'.
LynxSystemInfo.pixelWidth and pixelHeight
The screen's size in physical pixels.
LynxSystemInfo.pixelRatio
Physical pixels per CSS pixel.
LynxSystemInfo.screenWidth and screenHeight
The screen's size in CSS pixels: the physical size divided by pixelRatio.
LynxSystemInfo.runtimeType
The JavaScript engine that runs the background thread. Lynx sets it only on that thread.
LynxSystemInfo.theme
A theme object, if the host app provides one. For light or dark mode, use LynxTheme.
Types
PlatformType comes from @lynx-js/types:
