I have been able to access the default bluetooth adapter using var adapter = tizen.bluetooth.getDefaultAdapter(); and it works fine as far as now. But when I use var adapter = tizen.bluetooth.getLEAdapter(); for low energy bluetooth adapter I'm not getting the required bluetooth adapter object, i.e, they do not have any parameters like name, mac address as in the case of default adapter. And when I invoke the adapter.startScan() function of LEAdapter it does not return any results. I assume all the latest smartphones support the low energy adapter as well.
I have included the following previlages in the manifest.
<tizen:privilege name="http://tizen.org/privilege/bluetooth.gap"/>
<tizen:privilege name="http://tizen.org/privilege/bluetooth.admin"/>
<tizen:privilege name="http://tizen.org/privilege/bluetooth.spp"/>
<tizen:privilege name="http://tizen.org/privilege/bluetooth.health"/>
What am I doing wrong here?
getLEAdapter() Gets the default Low Energy Bluetooth adapter. You may try to Catch the exception:
Exceptions: WebAPIException thrown from getLEAdapter()
SecurityError, if the application does not have the privilege to call this method.
NotSupportedError, if the feature is not supported.
UnknownError, if any other error occurs.
To check if this method is supported or not, use tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth.le").
Resource Links to see: BluetoothManager::getLEAdapter
SystemInfo::getCapability