react-native-datawedge-intents | React Native interface for Zebra 's DataWedge Intent API
kandi X-RAY | react-native-datawedge-intents Summary
kandi X-RAY | react-native-datawedge-intents Summary
React Native interface for Zebra's DataWedge Intent API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Send broadcast with extras
- Convert the JSONObject to a Bundle
- Recursively deconstructs a ReadableArray
- Recursively reconstruct a readable map
- Called when a host is paused
- Unregisters a broadcast receiver
- Unregisters all broadcast receivers
- Broadcast an intent event
- Send an event to a single component
- Called when a host resume is resumed
- Register a broadcast receiver for this activity
- Create native modules
- Update the given value
- Send an Intent with the given action and the given action
- Register broadcast receiver
- Gets the map of DWAPI constants
- Unregisters receivers
- On host destroy
- Create JS modules
- Create view managers
react-native-datawedge-intents Key Features
react-native-datawedge-intents Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-datawedge-intents
QUESTION
I'm created small react native app for Zebra TC20 barcode scanner. It works just fine. The main issue I need to solve is somehow open my app on scan button press...
By default when scan button is pressed and if my app is not running the DWDemo app launches and shows scanned data. And I need that by default would be opened my app.
I'm using https://github.com/darryncampbell/react-native-datawedge-intents to get barcodes. And it uses DeviceEventEmitter
.
Maybe there are some techniques to register listener in foreground for specific event and start the app ?
...ANSWER
Answered 2020-Feb-26 at 08:10That React module (which I'm the author of by the way :) ) is hardcoded to assume that scan data will be sent via a Broadcast Intent. I did it this way because the DataWedge API can only communicate with the application via Broadcast Intents however scan data is not sent via the DataWedge API, it is sent via the DataWedge Intent output plugin which CAN support both startActivity and startService.
By default the device, out of the box, will not launch DWDemo when a barcode is scanned. If you launch DataWedge you will see a number of profiles, one of which will be the 'default' profile which is used when no other profile is in effect (i.e. no app associated with a specific profile is in the foreground) - you can configure this default profile to specify Intent delivery
as StartActivity and I assume whatever profile is default on your device is invoking the DWDemo app.
So, to achieve what you want to achieve you would need to:
- Configure the default DataWedge profile to start your app when a barcode is scanned.
- Use a React module that can process the Intent received (In Native code, something like https://github.com/Zebra/samples-datawedge/blob/master/DataWedge-API-Exerciser/app/src/main/java/com/zebra/datawedgeexerciser/MainActivity.java#L163 but I guess there must be a more generic ReactNative Intent module that can achieve this)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-datawedge-intents
You can use react-native-datawedge-intents like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the react-native-datawedge-intents component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page