查询当前手机的蓝牙连接状态
<h3>简要描述</h3>
<ul>
<li>查询当前手机的蓝牙连接状态</li>
</ul>
<h3>模块名称</h3>
<p><code>RNBluetooth</code></p>
<h3>方法详情</h3>
<pre><code>/**
* 询当前手机的蓝牙连接状态
* @callback {currentStatus} string -当前蓝牙的状态
* @callback error - 失败原因
*/
function bluetoothConnectionStatus((currentStatus, error) =&gt; {
});</code></pre>
<h3>使用示例</h3>
<pre><code>function bluetoothConnectionStatus((currentStatus, error) =&gt; {
if (error) {
console.error(`当前蓝牙连接状态 Error found! ${error}`);
} else {
console.log(`当前蓝牙连接状态: ${wifiName}`)
}
});
</code></pre>
<pre><code>结果
当前蓝牙连接状态: 空闲</code></pre>
<h5>备注</h5>