2017-01-23 7 views
0

私はギアのデバイスでtizenのためのBluetooth Webアプリケーションを試していました。[Tizen] [Bluetooth]ギアのデバイスがBluetoothをオンにしていません

コードをチェックしようとしたとき tizen.systeminfo.getCapability(BLUETOOTH_FEATURE_KEY); falseを返します。ただし、デバイスにはBluetooth機能があります。 他のデバイスにも接続されます。

+0

を追加します。 –

答えて

0

適切な機能キーを使用して、必要な特権を追加します。

try 
    { 
     /* Checks if a device supports bluetooth API */ 
     var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth"); 
     console.log(" Bluetooth = " + bluetooth); 
     document.getElementById("isOnBL").innerHTML = "Bluetooth : "+bluetooth; 
    } 
    catch (error) 
    { 
     console.log("Error name: " + error.name + ", message: " + error.message); 
    } 

答えをチェックし、特権

<tizen:privilege name="http://tizen.org/privilege/system"/> 

関連する問題