The next step is to check the state of the adapter, i.e. check whether the Bluetooth
adapter is turned on and whether the user has granted your application permission.
You must also take into account that the user may turn off Bluetooth at any time so
you should listen for the
STATE_CHANGED event and react accordingly. Any scanning will
be stopped and you'll have to restart this once the adapter state changes again.
The values of the state property are defined in the
On iOS we cannot turn the adapter through code, instead you have to prompt the user, requesting they turn on Bluetooth.