Options
All
  • Public
  • Public/Protected
  • All
Menu

Module device

The device module provides information and operations about the device, such as getting the device width and height, memory usage, device ID, adjust the brightness, volume, etc.

Some functions of this module, need the "write system settings" permission. If the permission is not granted, an exception will be thrown.

The main function document of this module is in Device and OS classes.

Index

Type aliases

PluggedType

PluggedType: "usb" | "wireless" | "ac"

StreamType

StreamType: "music" | "alarm" | "notification" | "voice_call" | "system" | "ring" | "dtmf" | "accessibility"

音量类型,包括:

  • music: 音乐(媒体)音量
  • alarm: 闹钟音量
  • notification: 通知音量
  • ring: 铃声音量
  • voice_call: 通话音量
  • system: 系统音量
  • dtmf: DTMF音量
  • accessibility: 辅助功能音量

Variables

Const device

device: Device = ...