Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Events (or update Docs) #849

Open
JThobbyist opened this issue Apr 16, 2022 · 2 comments
Open

Improve Events (or update Docs) #849

JThobbyist opened this issue Apr 16, 2022 · 2 comments

Comments

@JThobbyist
Copy link

JThobbyist commented Apr 16, 2022

Events should be listenable directly on the BleManager instance. The docs show something like

import { NativeModules, NativeEventEmitter } from 'react-native';
BleManagerEventEmitter = new NativeEventEmitter(BleManagerModule);

This should be included out-of-the-box by adding the above 'import' statement as well as the following class-edits to BleManage.js:

class BleManager extends NativeEventEmitter {
constructor(){
super(BleManagerModule);
...
}
...
}```

And if this is already the case that BleManager exposes events itself, then the docs should be updated (but it doesn't look like it does based on inspection of the code)
@marcosinigaglia
Copy link
Member

Hi, I made the example like the official doc, why are you suggesting to do it in another way?

@JThobbyist
Copy link
Author

JThobbyist commented Jul 25, 2022 via email

@marcosinigaglia marcosinigaglia linked a pull request Jan 4, 2024 that will close this issue
@marcosinigaglia marcosinigaglia removed a link to a pull request Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants