cordova-plugin-bluetoothle icon indicating copy to clipboard operation
cordova-plugin-bluetoothle copied to clipboard

No callback when there is a connection in peripheral(iOS)

Open ghost opened this issue 6 years ago • 7 comments

I'm using initializePerheral() to init bluetooth for peripheral(iOS), addService() and startAdvertising(), but when there is a connection, don't have any callback! Only callback in case: enabled, disabled, subscribed, unsubscribed!

ghost avatar Mar 14 '19 07:03 ghost

Try running the example in the angular wrapper

randdusing avatar Mar 15 '19 00:03 randdusing

Try running the example in the angular wrapper

Thank for reply! I tried to run the example but ionic v1 is too old to build ios application(can't use ionic v4 to running it). Can you help me review your guide? Thanks!

ghost avatar Mar 15 '19 01:03 ghost

I've started using Angular (2+) and observables much more often at my day job. When I originally created the plugin and AngularJS wrapper a few years ago, I knew nothing about Angular (2+) nor rxjs. I can't do anything in the near future due to some important real life commitments, but perhaps I can create a new example based on Ionic 4.

randdusing avatar Mar 15 '19 13:03 randdusing

I still recommend checking out the code in the example and make sure you're following the same pattern.

randdusing avatar Mar 15 '19 13:03 randdusing

Thanks for your answers! I am developing it on ionic 4, I tried to learn a lot but failed, very much looking forward to your example on ionic 4!

ghost avatar Mar 15 '19 13:03 ghost

I too am seeing the same issue. Running this in a Cordova (phonegap) implementation. Structured the code to be similar to the angular example, but still only get the 4 callbacks -- enabled, disabled, subscribed, unsubscribed.

tvalentino avatar Jan 15 '20 17:01 tvalentino

I too am seeing the same issue. Running this in a Cordova (phonegap) implementation. Structured the code to be similar to the angular example, but still only get the 4 callbacks -- enabled, disabled, subscribed, unsubscribed.

@tvalentino did you find any solution ?

@randdusing after bluetoothle.initializePeripheral(success, error, { request: true }); and connect to BLE device readRequested status never fired on iOS but Android works perfect.

Sebartus avatar Jan 26 '22 14:01 Sebartus