You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on discussion with @jmiranda, this would be a 2 part functionality:
Get data from devices connected over Bluetooth.
Resolve data received over Bluetooth.
Getting data from devices connected over Bluetooth
There are 2 types of workflows that need to be supported as part of this
Barcode scanning devices that communicate over Bluetooth directly.
Barcode scanning devices that communicate via a custom protocol.
Barcode scanning devices that communicate over Bluetooth directly
Based on the demo provided by @jmiranda, these devices are first connected to the smart phone over Bluetooth and post that, whenever they detect any sort of barcode, they pass along that data to the smart phone and that data gets "pasted" into any text field that was in focus at the time.
Pretty bare bones setup. There must be some way to intercept that "pasting" action so that we can intercept that data and do something with it.
Barcode scanning devices that communicate via a custom protocol.
Let's look at Zebra devices for an example. They have their own SDKs and they also have APIs that rely on Android intents to communicate scanned data. The latter would obviously not work for iOS devices. So in order to support these devices, we will have to use their SDKs/APIs.
Resolve data received over Bluetooth
Once data has been received over Bluetooth, we need to figure out if it's relevant to us and then do something with it.
For now we are going to assume that the scanned data is going to point to a product "id" and upon scanning we are immediately going to resolve it as such. And if the scanned data was successfully resolved as a product, we will open the product details page for the same. Doesn't matter where the user was earlier, if a product was scanned, we will immediately take them to the respective product details page.
With bar code scanning, this is where we are going to try to get before considering further use cases.
The text was updated successfully, but these errors were encountered:
@jmiranda I have hit a blockade with bluetooth communication in relation to Expo.
I was looking at this library to capture data sent over Bluetooth only to learn that Expo doesn't support addition of any "native modules".
Because Expo essentially has its own runtime that we are running our app inside of, we can only run code that doesn't require making any changes that are specific to the native side of things i.e. Android or iOS environment. If we wish to make such changes, we would have to make them in the Expo runtime itself, and as such that isn't supported at the moment.
And because Bluetooth access requires adding custom code for Android and iOS environments, and Expo does not have first class support for that usecase in their own runtime, we cannot add the library I mentioned above to our app without ejecting from Expo.
They have been working on a tool called EAS build that would allow one to make changes to their runtime but at the moment it's available as a paid feature only. You can read more about it here
So bottom line, if we wish to use bluetooth libraries in our codebase, we will have to eject the app from Expo and go via the bare bones React Native route. It is what the folks at Expo recommend as well.
Based on discussion with @jmiranda, this would be a 2 part functionality:
Getting data from devices connected over Bluetooth
There are 2 types of workflows that need to be supported as part of this
Barcode scanning devices that communicate over Bluetooth directly
Based on the demo provided by @jmiranda, these devices are first connected to the smart phone over Bluetooth and post that, whenever they detect any sort of barcode, they pass along that data to the smart phone and that data gets "pasted" into any text field that was in focus at the time.
Pretty bare bones setup. There must be some way to intercept that "pasting" action so that we can intercept that data and do something with it.
Barcode scanning devices that communicate via a custom protocol.
Let's look at Zebra devices for an example. They have their own SDKs and they also have APIs that rely on Android intents to communicate scanned data. The latter would obviously not work for iOS devices. So in order to support these devices, we will have to use their SDKs/APIs.
Resolve data received over Bluetooth
Once data has been received over Bluetooth, we need to figure out if it's relevant to us and then do something with it.
For now we are going to assume that the scanned data is going to point to a product "id" and upon scanning we are immediately going to resolve it as such. And if the scanned data was successfully resolved as a product, we will open the product details page for the same. Doesn't matter where the user was earlier, if a product was scanned, we will immediately take them to the respective product details page.
With bar code scanning, this is where we are going to try to get before considering further use cases.
The text was updated successfully, but these errors were encountered: