Git Product home page Git Product logo

openboxes-mobile's Issues

Support barcode scanning via devices connected over Bluetooth

Based on discussion with @jmiranda, this would be a 2 part functionality:

  1. Get data from devices connected over Bluetooth.
  2. 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

  1. Barcode scanning devices that communicate over Bluetooth directly.
  2. 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.

Build failed with an exception while testing expo_eject branch

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ adb devices
List of devices attached
19064521402185	device

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
warn Package expo-updates has been ignored because it contains invalid configuration. Reason: Cannot find module 'expo-updates/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-native-screens has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-screens/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-native-unimodules has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-unimodules/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-native-web has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-web/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package babel-jest has been ignored because it contains invalid configuration. Reason: Cannot find module 'babel-jest/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package jest has been ignored because it contains invalid configuration. Reason: Cannot find module 'jest/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-test-renderer has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-test-renderer/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1314 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/jmiranda/git/openboxes-mobile/android/settings.gradle' line: 3

* What went wrong:
A problem occurred evaluating settings 'openboxes-expo'.
> Could not read script '/home/jmiranda/git/openboxes-mobile/node_modules/react-native-unimodules/gradle.groovy' as it does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 557ms

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Create component that accepts barcode scan

After scanning data into the field the field

  • should either store data in field as-is or should pull extra data using API.
  • should be read only
  • should transition focus to the next input field when available.
  • should display an error if API request does not return data

For example a SKU field should attempt to lookup the product associated with the SKU. The SKU and product name should be visible / read only. Clicking on the field should make it editable / scannable again.

In the case that the field is the only field on the page then subsequent scans could potentially update the field value even when the field is read only but we'd need to check if usability is ok there. I think a better approach for single field pages would be to move to the next page (in case of a wizard).

Note: We'll need a separate component for searching by SKU and bin location. This component should not exhibit behavior above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.