device - Device
10/22/22Less than 1 minute
The device module exposes hardware and OS state (screen size, memory, product/build strings, battery, brightness, volume, …) and a few related controls.
Some APIs need WRITE_SETTINGS (“modify system settings”). If the app lacks that permission, those calls throw.
The main API surface of this module is documented under Device and OS.
Table of contents
Enums
Classes
Interfaces
Types
Constants
Types
PluggedType
Possible values: "usb" | "wireless" | "ac".
StreamType
Possible values: "music" | "alarm" | "notification" | "voice_call" | "system" | "ring" | "dtmf" | "accessibility".
Stream identifiers map to Android AudioManager stream types:
music— media playbackalarm— alarmsnotification— notificationsring— ringervoice_call— voice callssystem— system soundsdtmf— dial-pad tonesaccessibility— accessibility prompts
device
device:Device
Singleton Device API object.
