React Native - Warning Beeps

Y Yanis Dalabiras 3 years 6 months ago
92 1 0

Hi,
I have just created a barcode scanning app for the TC8000 using react native and react-native-datawedge-intents.
Are there any API's for playing a warning beep sound if the scanned barcode does not return any results from the backend server?
Thanks
James

Please Register or Login to post a reply

1 Replies

D Darryn Campbell

Hi James,
In order to play the warning beep sound in your app you would need to do this yourself as Zebra do not offer any APIs to do this.  There are numerous Android APIs for playing sounds, I personally used the ToneGenerator in one of my previous app (https://github.com/darryncampbell/WakeLock_WifiLock_Exerciser/blob/mast…) but for ReactNative, this module looks good: https://github.com/perotta/react-native-tone-android, though I have not tried it myself - you might want to Google around.
You might want to mute the scan sound that DataWedge makes when you scan a barcode, otherwise your user will get 2 beeps, one to say the scan occured and another to say there was a backend lookup error.  If you do want to do this you can modify the DataWedge profile under "Configure Scanner Settings" > "Scan params" > "Decode Audio Feedback" setting to be 'None'

CONTACT
Can’t find what you’re looking for?