【问题标题】:Tizen Cannot read property 'getDefaultAdapter' of undefinedTizen 无法读取未定义的属性“getDefaultAdapter”
【发布时间】:2018-02-27 16:31:06
【问题描述】:

当我尝试在 tizen studio 中获取蓝牙属性时:

var bluetoothSwitchAppControl = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/edit', null, 'application/x-bluetooth-on-off');
var adapter = tizen.bluetooth.getDefaultAdapter();

我收到此错误:

未捕获的类型错误:无法读取未定义的属性“getDefaultAdapter”

问题是什么以及如何解决?

【问题讨论】:

    标签: tizen tizen-wearable-sdk tizen-web-app


    【解决方案1】:

    完全没问题。你不需要解决任何问题。您很可能正在 Tizen Wearable/Mobile Emulator 上运行该项目。

    在模拟器上部署应用程序时,tizen.bluetooth.getDefaultAdapter() 和其他相关蓝牙功能将未定义,因为模拟器不支持蓝牙。当您在真实设备上部署项目时,它会按预期工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-06
      • 2020-10-30
      • 2019-10-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多