Skip to content

Android Mobile Env

Android mobile platform for various-devices

getMobileDeviceInfo

platform Android

usage

js
import { isAndroid } from 'various-devices'
const result = isAndroid()

isAndroid This API is used to check if the current platform is Android. It return value boolean

js
import { getMobileDeviceInfo } from 'various-devices'
const result = getMobileDeviceInfo()

getMobileDeviceInfo This API is used to retrieve information about mobile devices, including the device type Android and the current screen width and height.

ts
export interface Result {
  platform: "android";
  screenWidth: number;
  screenHeight: number;
}

params

  1. platform string platform (Android 环境)
  2. screenWidth number current screen width(当前屏幕宽度)
  3. screenHeight number current screen height(当前屏幕高度)

Contributors

xiaoMan
xiaoMan

💻 📖 🎨
yanzibiezou
yanzibiezou

💻
徐轲
徐轲

💻
yinxing233
yinxing233

💻
Add your contributions