blueToothEnable 打开蓝牙(只 Android 端支持)

blueToothEnable ^7.8

打开蓝牙(只 Android 端支持)

#请求参数

N/A

#引入接口模块

import bridge from '@minix-iot/etsbridge-sdk'

#接口调用示例

bridge
  .blueToothEnable()
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })

#接口返回示例

this.$bridge.addEventListener('receiveMessageFromApp', (res) => {
  console.log('blueToothEnable', JSON.stringify(res))
  this.$bridge.showToast({
    title: JSON.stringify(res),
    duration: 5,
  })
})

#FAQ

TIP

通过 receiveMessageFromApp 事件返回结果

posted on 2024-12-27 09:31  AtlasLapetos  阅读(5)  评论(0)    收藏  举报