You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a bit confused as to how state / stateChange work...I initially assumed that a stateChange event would be automatically emitted when the user enables / disables bluetooth, but this doesn't seem to be the case. I then thought I should check whether bluetooth is on or off (whenever I need it), and change the state + emit event myself (" noble.state = 'poweredOn; noble.emit('stateChange', 'poweredOn' "), but even though this changes the noble.state to whatever I want it to, when I try and scan for devices, the scan actually starts but doesn't actually find anything (even though there are devices to be found).
In short: if I start the app with bluetooth off, I don't seem to be able to find devices even though I subsequently enable bluetooth, change noble state to 'poweredOn', and emit the appropriate 'stateChange' event.
I would greatly appreciate anyone shedding some light on this, and whether this behavior is normal (but I'm doing it wrong), or is it a bug?
The text was updated successfully, but these errors were encountered:
Cody-G-G
changed the title
state / stateChange [Android]
state / stateChange behavior [Android]
Dec 3, 2016
I am a bit confused as to how state / stateChange work...I initially assumed that a stateChange event would be automatically emitted when the user enables / disables bluetooth, but this doesn't seem to be the case. I then thought I should check whether bluetooth is on or off (whenever I need it), and change the state + emit event myself (" noble.state = 'poweredOn; noble.emit('stateChange', 'poweredOn' "), but even though this changes the noble.state to whatever I want it to, when I try and scan for devices, the scan actually starts but doesn't actually find anything (even though there are devices to be found).
In short: if I start the app with bluetooth off, I don't seem to be able to find devices even though I subsequently enable bluetooth, change noble state to 'poweredOn', and emit the appropriate 'stateChange' event.
I would greatly appreciate anyone shedding some light on this, and whether this behavior is normal (but I'm doing it wrong), or is it a bug?
The text was updated successfully, but these errors were encountered: