-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
BLE.autoconnect #2573
Comments
don
added a commit
to don/ionic-native
that referenced
this issue
Jul 2, 2018
My current fix for this uses
@danielsogl @ihadeed @mhartington is there any way to have the Cordova wrapper bind callbacks for the user? |
don
added a commit
to don/ionic-native
that referenced
this issue
Jul 11, 2018
danielsogl
pushed a commit
that referenced
this issue
Jul 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
Current behavior:
BLE.autoConnect returns an Observable which only works on time. The for Cordova, connect/success and disconnect/failure functions are called multiple times. With an Observable the disconnect function can only be called 1x.
https://github.com/ionic-team/ionic-native/blob/master/src/%40ionic-native/plugins/ble/index.ts#L306-L313
Expected behavior:
BLE.autoconnect needs to return callbacks. I think the right way to do this is to wrap as a sync function and use the callbacks directly?
Other information:
Do any other plugins have callbacks that are called many times? It'd be nice if the behavior here matched other Ionic plugins.
I'll send a pull request to fix this once I figure out the right way to do this.
The text was updated successfully, but these errors were encountered: