kenjdavidson / react-native-bluetooth-classic

⚛ Bluetooth classic Android(Bluetooth)/IOS(ExternalAccessory) module for serial communication
https://kenjdavidson.github.io/react-native-bluetooth-classic
MIT License
250 stars 93 forks source link

register ByteArray device connection factory #148

Closed wallaroo closed 3 years ago

wallaroo commented 3 years ago

register ByteArray device connection factory at startup. in this way we don't need to change native code (new Expo managed flow) to talk with devices in binary mode.

kenjdavidson commented 3 years ago

You didn't want to take a stab at the IOS version of ByteArrayDeviceConnection??

wallaroo commented 3 years ago

You didn't want to take a stab at the IOS version of ByteArrayDeviceConnection??

yep i'll work on it soon

kenjdavidson commented 3 years ago

Ha.. was just poking fun.

But in all honesty, if you can do it, I would love it! I'm lazy and openly not at all a great IOS developer.

Thanks again!

wallaroo commented 3 years ago

Openly... I need it, so i'll open XCode for the second time and split screen with stackoverflow on swift section... 😉 But let me procrastinate another little bit...

Il gio 25 nov 2021, 15:19 Ken Davidson @.***> ha scritto:

Ha.. was just poking fun.

But in all honesty, if you can do it, I would love it! I'm lazy and openly not at all a great IOS developer.

Thanks again!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kenjdavidson/react-native-bluetooth-classic/pull/148#issuecomment-979253180, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWBYUA2OXCVSYD2CRQAFTDUNZAW3ANCNFSM5IYCFJQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kenjdavidson commented 3 years ago

You and I... we're the same!!

I think together we can get it working..

kenjdavidson commented 3 years ago

Just noticed an issue.

The ByteArrayDeviceConnectionImpl is creating a Buffer of size READ_SIZE. The READ_SIZE is used in the AbstractDeviceConnection for each read operation.

This is cool if there is a listener configured:

but if there is no listener

This will need to be looked at.