MiniX自绘渲染跨平台框架
  • 框架说明
  • 声明式开发范式
  • 内置Api
指南
接口
  • Minix CLI
示例
  • 类Web框架

    • 框架说明
    • 类Web开发范式
    • 内置Api
  • 指南
  • 组件
  • 接口
  • 示例
  • 规范
  • DophinHybrid

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • DolphinWeex

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • 发布消息
  • 常见问题
  • 更新日志
  • 框架说明
  • 声明式开发范式
  • 内置Api
指南
接口
  • Minix CLI
示例
  • 类Web框架

    • 框架说明
    • 类Web开发范式
    • 内置Api
  • 指南
  • 组件
  • 接口
  • 示例
  • 规范
  • DophinHybrid

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • DolphinWeex

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • 发布消息
  • 常见问题
  • 更新日志
  • 快速上手
  • Basic 基础

  • Account

  • UI 界面

  • Device 设备

    • changeVolume
    • checkAndRequestPermission
    • getBatteryInfo 获取电量
    • setKeepScreenOn 屏幕常亮
    • getScreenBrightness 获取屏幕亮度
    • setScreenBrightness 设置屏幕亮度
      • startCompass 罗盘监听
      • stopCompass 停止罗盘监听
      • startGyroscope 陀螺仪监听
      • stopGyroscope 停止陀螺仪监听
      • startAccelerometer 加速计监听
      • stopAccelerometer 停止加速计监听
      • vibrateLong 手机振动(长时间)
      • vibrateShort 手机振动(短时间)
      • startDeviceMotionListening 设备方向监听
      • stopDeviceMotionListening 停止设备方向监听
      • getNetworkStatus
      • vibrate 使手机发生震动
      • getAppInfo 获取APP的信息
      • getAppNewVersion 返回版本号
      • getElderMode 是否为老人模式
      • upgradeApp 按升级策略进行升级
      • setBackHandle 监控手机物理返回键功能
      • openNativeSystemSetting 打开系统设置
      • setPageOrientation 切换页面横竖屏方向
    • Bluetooth 蓝牙

    • Wifi WiFi

    • HomeManage 家庭管理

    • RoomManage 房间管理

    • Media 媒体

    • Location 定位

    • Encryption 加/解密

    • FileStorage 文件/存储

    • Http 网络/请求

    • weather 天气信息

    • Siri

    • TelPhone

    请扫码查看示例

    # setScreenBrightness ^6.8

    设置屏幕亮度

    # 请求参数

    Prop Type Value
    value Number [0-1]

    # 参数代码示例

    let params = { value: 0.5 }
    
    1

    # 接口调用示例

    import bridge from '@minix-iot/etsbridge-sdk'
    
    1
    let params = { value: 0.5 }
    bridge
      .setScreenBrightness(params)
      .then((res) => {
        console.log(res)
      })
      .catch((err) => {
        // 错误处理
        console.log(err)
      })
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    # 返回参数

    • 成功时返回
    Prop Type Value
    code Number 0
    msg String success
    • 失败时返回(value 为空或者没有)
    Prop Type Value
    code Number -2
    msg json 解析失败

    # 返回示例

    
    {
      "code": 0,
      "msg": "success"
    }
    
    
    1
    2
    3
    4
    5
    6