Skip to content

Conversation

@jacobrosenthal
Copy link

It would be nice to emit, or internally listen to emitters and use callbacks for async support. For instance its currently impossible to know when you've successfully stopped advertising so you can start again. Also it would be nice to be notified of advertisingStartError and servicesSetError.

@sandeepmistry offered to the solution just listen on the bleno singleton but it seems like these are in the domain of eddystone beacon and should be offered?

Anyway this should open it for discussion at least.

@sandeepmistry
Copy link
Collaborator

@jacobrosenthal thanks for starting the discussion.

Agreed, I think the following events are relevant: 'advertisingStartError', 'advertisingStart', 'advertisingStop'. What use cases were you thinking of for re-emitting the other bleno event?

Would changing the advertising API's to include an optional callback help?

@jacobrosenthal
Copy link
Author

Hadnt thought of a need for the others yet, but figured why not spit them
out while I was at it :)

Emitting vs callbacks is probably your preference. Callbacks can be
promisified easier...

On Sun, Sep 6, 2015 at 2:51 PM, Sandeep Mistry [email protected]
wrote:

@jacobrosenthal https://github.com/jacobrosenthal thanks for starting
the discussion.

Agreed, I think the following events are relevant:
'advertisingStartError', 'advertisingStart', 'advertisingStop'. What use
cases were you thinking of for re-emitting the other bleno event?

Would changing the advertising API's to include an optional callback help?


Reply to this email directly or view it on GitHub
#22 (comment)
.

@sandeepmistry
Copy link
Collaborator

I would say callbacks are the way to go for now. @don what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants