Notify (Bluetooth Scanner Notifications)

DataWedge 11.4

NOTIFY

Used to play notification sound(s) and/or display a colored LED after a scan from a connected Bluetooth scanner with RSM (Remote Scanner Management). Multiple notifications can be played in succession.

Supported notifications:

  • green LED on/off
  • red LED on/off
  • short/long beep
  • fast/slow warble beep
  • high/low beep
  • low-high beep
  • high-low-high beep
  • low-high-low beep
  • high-high-low-low beep
  • multiple beeps in succession, from 1 to 5 times

Supported Bluetooth Scanners with Device Identifiers:

Bluetooth Scanner Device Identifier
DS3678 BLUETOOTH_DS3678
RS5100 BLUETOOTH_RS5100
RS6000 BLUETOOTH_RS6000
RS6100 BLUETOOTH_GENERIC

Function Prototype

Bundle bundleNotify = new Bundle();
Bundle bundleNotificationConfig = new Bundle();
i.setAction("com.symbol.datawedge.api.ACTION");

bundleNotificationConfig.putString("DEVICE_IDENTIFIER", <Device Identifier>);
bundleNotificationConfig.putIntArray("NOTIFICATION_SETTINGS", int[]);
bundleNotify.putBundle("NOTIFICATION_CONFIG", bundleNotificationConfig);

i.putExtra("com.symbol.datawedge.api.notification.NOTIFY", bundleNotify);
this.sendBroadcast(i);

Parameters

ACTION [string]: "com.symbol.datawedge.api.ACTION"

EXTRA_DATA [string]: "com.symbol.datawedge.api.notification.NOTIFY"

DEVICE IDENTIFIER [string]: Device identifier of the supported Bluetooth scanner.

NOTIFICATION_SETTINGS [integer]: Integer array of the notification RSM attributes. If multiple attributes are specified, notifications are played one after another in ascending order of the integer array.

Notification RSM attributes for LED/Beep:

  • 1 high short beep            0
  • 2 high short beeps          1
  • 3 high short beeps          2
  • 4 high short beeps          3
  • 5 high short beeps          4
  • 1 low short beep              5
  • 2 low short beeps            6
  • 3 low short beeps            7
  • 4 low short beeps            8
  • 5 low short beeps            9
  • 1 high long beep              10
  • 2 high long beeps            11
  • 3 high long beeps            12
  • 4 high long beeps            13
  • 5 high long beeps            14
  • 1 low long beep               15
  • 2 low long beeps             16
  • 3 low long beeps             17
  • 4 low long beeps             18
  • 5 low long beeps             19
  • Fast warble beep             20
  • Slow warble beep            21
  • High-low beep                  22
  • Low-high beep                  23
  • High-low-high beep          24
  • Low-high-low beep           25
  • High-high-low-low beep   26
  • Green LED off                    42
  • Green LED on                    43
  • Red LED on                        47
  • Red LED off                       48

Result Codes

DataWedge returns the following error codes if the app includes the intent extras SEND_RESULT and COMMAND_IDENTIFIER to enable the app to get results using the DataWedge result intent mechanism. See Example, below.

  • DATAWEDGE_DISABLED - DataWedge is disabled
  • DEVICE_NOT_SUPPORTED - Device does not support notifications
  • PARAMETER_INVALID - No values are specified in the RSM attribute array
  • DEVICE_NOT_CONNECTED - Scanner is not connected

Example Code

This sample code turns on the red LED and plays 3 low long beeps.

Intent i = new Intent();
Bundle bundleNotify = new Bundle();
Bundle bundleNotificationConfig = new Bundle();
i.setAction("com.symbol.datawedge.api.ACTION");

bundleNotificationConfig.putString("DEVICE_IDENTIFIER", "BLUETOOTH_DS3678");
bundleNotificationConfig.putIntArray("NOTIFICATION_SETTINGS", new int[]{17, 47});
bundleNotify.putBundle("NOTIFICATION_CONFIG", bundleNotificationConfig);

i.putExtra("com.symbol.datawedge.api.notification.NOTIFY", bundleNotify);
this.sendBroadcast(i);

SEE ALSO:

Zebra Support Central | Integrator Guides, Product Manuals, Software Downloads and Support

LaunchPad | Zebra Developer Community

Intent | Android Developers

Intents and Intent Filters | Android Developers

Android Intents | Tutorial