You are on page 1of 183

"#$%&'( )*+*,*%#*

Release R6







Apiil 16, 2u14
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 2/183




-./01- 23#45*%67 8-10900:1; <

<='>)(?@A B=A(<C

Copyiight 2u14 Socket Nobile, Inc. All iights ieseiveu.

Socket, the Socket logo, Batteiy Fiienuly, Socket !"#$%&&%' Coiuless Banu Scannei, anu SocketScan aie tiauemaiks oi
iegisteieu tiauemaiks of Socket Nobile, Inc. !"#$%&&%' anu the !"#$%&&%' logos aie iegisteieu tiauemaiks owneu by !"#$%&&%'
SIu, Inc., 0.S.A. anu licenseu to Socket Nobile, Inc. All othei bianu anu piouuct names aie tiauemaiks of theii iespective
holueis.

The Socket !"#$%&&%' Coiuless Banu Scannei incluues technology licenseu unuei 0niteu States Patent Numbeis S,9u2,991,
7,429,uuu B1 anu BS26,S2u S.

Repiouuction of the contents of this manual without the peimission of Socket Nobile is expiessly piohibiteu. Please be awaie
that the piouucts uesciibeu in this manual may change without notice. Feel fiee to contact Socket Nobile at:

"3#D*6 E3FGH*I (%#J
S97uu Euieka Biive, Newaik, CA 94S6u-48u8, 0SA
+1-S1u-9SS-Suuu
0SACanaua Toll-fiee: 1-8uu-SS2-SSuu
http:www.socketmobile.comcontact

0thei than the above, Socket Nobile can assume no iesponsibility foi anything iesulting fiom the application of infoimation
containeu in this manual.

Please iefiain fiom any applications of the Socket !"#$%&&%' Coiuless Banu Scannei that aie not uesciibeu in this manual.
Please iefiain fiom uisassembling the !"#$%&&%' Coiuless Banu Scannei. Bisassembly of this uevice will voiu the piouuct
waiianty.

You can tiack new piouuct ieleases, softwaie upuates anu technical bulletins by visiting the Socket Nobile website at:
http:www.socketmobile.com(

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 3/183
A$FH* 3+ #3%6*%6K

C0PYRIuBT N0TICE ................................................................................................................ 2
1 Scannei connection oveiview .................................................................................. 7
1.1 Scanner connection information ........................................................................... 7
2 ScanAPI Intiouuction .............................................................................................. 10
3 SoftScan Feature ....................................................................................................... 11
3.1 Licensing requirements ...................................................................................... 11
3.2 iOS requirements ................................................................................................ 11
3.3 Android requirements ......................................................................................... 12
4 Concept ..................................................................................................................... 13
4.1 ScanAPI object ................................................................................................... 13
4.2 Device object ...................................................................................................... 13
4.3 ScanObject .......................................................................................................... 13
4.4 0sing ScanAPI ................................................................................................... 14
4.5 ScanAPI configuration ....................................................................................... 15
4.6 uet oi Set a piopeity ........................................................................................ 15
4.7 Example of senuing a commanu ...................................................................... 16
4.8 Banuling asynchionous events oi completion events ................................... 25
4.9 Teimination ....................................................................................................... 26
S ScanAPI Belpei (available foi }ava, C# anu 0bjective C) ..................................... 26
S.1 Banuling the ScanAPI Belpei notifications .................................................... 27
S.2 Set ScanAPI Belpei notification ....................................................................... 34
S.S 0pen ScanAPI Belpei ........................................................................................ 34
S.4 Close ScanAPI Belpei ....................................................................................... 34
S.S Scannei aiiival .................................................................................................. 34
S.6 Becoueu uata notification ................................................................................ 35
S.7 Scannei iemoval ............................................................................................... 35
S.8 Is theie a connecteu Scannei ........................................................................... 36
S.9 uet the list of scanneis ..................................................................................... 36
S.1u No Bevice Connecteu item ............................................................................ 36
6 IBE Integiation ........................................................................................................ 36
6.1 CC++ veision ................................................................................................... 36
6.2 }ava veision ....................................................................................................... 36
6.S C# veision ......................................................................................................... 38
6.4 0bjective C Xcoue integiation .......................................................................... 38
7 Recommendations ..................................................................................................... 39
7.1 General ............................................................................................................... 39
7.2 Android ............................................................................................................... 39
7.3 iOS ...................................................................................................................... 40
8 Bevice Connection anu Bisconnection piocess .................................................... 40
8.1 Initial Connection .............................................................................................. 40
8.2 Subsequent Connection .................................................................................... 41
8.S Reconnection ..................................................................................................... 41
8.4 Bisconnection .................................................................................................... 41
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 4/183
8.S Roaming ............................................................................................................. 42
8.6 Socket EZ Paii featuie ...................................................................................... 42
9 Data Editing .............................................................................................................. 43
9.1 Profile ................................................................................................................. 44
9.2 Trigger ................................................................................................................ 44
9.3 Operations .......................................................................................................... 46
9.4 Import-Export ..................................................................................................... 51
10 Specific scanner configurations ................................................................................ 53
10.1 Adaptive Scanning .......................................................................................... 53
10.2 Scan Angle ...................................................................................................... 54
10.3 Code 39 Length configuration ........................................................................ 54
10.4 Interleaved 2 of 5 Length configuration ......................................................... 56
10.5 UPCA format .................................................................................................. 58
11 API Functions ........................................................................................................ 59
11.1 0pen Function ............................................................................................... 60
11.2 Close Function ............................................................................................... 64
11.S Set Function ................................................................................................... 66
11.4 uet Function .................................................................................................. 71
11.S Wait Function ................................................................................................ 75
11.6 Release Function ........................................................................................... 78
12 Scan0bject ............................................................................................................. 80
1S Asynchionous messages anu events ................................................................... 81
1S.1 Bevice Aiiival ................................................................................................ 81
1S.2 Bevice Removal ............................................................................................. 81
1S.S Teiminate ...................................................................................................... 81
1S.4 Set Complete .................................................................................................. 81
1S.S uet Complete ................................................................................................. 82
1S.6 Events ............................................................................................................. 82
14 Intiouuction to Piopeities ................................................................................... 87
1S ScanAPI object piopeities ................................................................................... 88
1S.1 Piopeity kSktScanPiopIuAboit ................................................................... 88
1S.2 Piopeity kSktScanPiopIuveision ................................................................ 89
1S.S Piopeity kSktScanPiopIuInteifaceveision ................................................ 91
1S.4 Piopeity kSktScanPiopIuConfiguiation ..................................................... 92
1S.S Piopeity kSktScanPiopIuBataConfiimationNoue ..................................... 94
1S.6 Piopeity kSktScanPiopIuBataConfiimationAction ................................... 96
1S.7 Piopeity kSktScanPiopIuNonitoiNoue ..................................................... 97
15.8 Property kSktScanPropIdSoftScanStatus ....................................................... 99
15.9 Property kSktScanPropIdDataEditingProfile ............................................... 101
15.10 Property kSktScanPropIdDataEditingCurrentProfile ................................... 101
15.11 Property kSktScanPropIdDataEditingTriggerSymbologies ......................... 102
15.12 Property kSktScanPropIdDataEditingTriggerMinLength ............................ 103
15.13 Property kSktScanPropIdDataEditingTriggerMaxLength ............................ 104
15.14 Property kSktScanPropIdDataEditingTriggerStartsBy ................................ 105
15.15 Property kSktScanPropIdDataEditingTriggerEndsWith .............................. 106
15.16 Property kSktScanPropIdDataEditingTriggerContains ................................ 106
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 5/183
15.17 Property kSktScanPropIdDataEditingOperation .......................................... 107
16 Bevice object piopeities .................................................................................... 109
16.1 Piopeity kSktScanPiopIuveisionBevice .................................................. 109
16.2 Piopeity kSktScanPiopIuBeviceType ....................................................... 109
16.S Piopeity kSktScanPiopIuBeviceSpecific .................................................. 111
16.4 Piopeity kSktScanPiopIuSymbologyBevice ............................................. 112
16.S Piopeity kSktScanPiopIuTiiggeiBevice ................................................... 115
16.6 Piopeity kSktScanPiopIuApplyConfigBevice ........................................... 116
16.7 Piopeity kSktScanPiopIuPieambleBevice ............................................... 116
16.8 Piopeity kSktScanPiopIuPostambleBevice ............................................. 117
16.9 Piopeity kSktScanPiopIuCapabilitiesBevice ........................................... 117
16.1u Piopeity kSktScanPiopIuChangeIuBevice ............................................... 119
16.11 Piopeity kSktScanPiopIuFiienulyNameBevice ....................................... 120
16.12 Piopeity kSktScanPiopIuSecuiityNoueBevice ........................................ 122
16.1S Piopeity kSktScanPiopIuPinCoueBevice ................................................. 124
16.14 Piopeity kSktScanPiopIuBeletePaiiingBonuingBevice .......................... 124
16.1S Piopeity kSktScanPiopIuRestoieFactoiyBefaultsBevice ....................... 125
16.16 Piopeity kSktScanPiopIuSetPowei0ffBevice .......................................... 125
16.17 Piopeity kSktScanPiopIuButtonStatusBevice ......................................... 126
16.18 Piopeity kSktScanPiopIuSounuConfigBevice .......................................... 126
16.19 Piopeity kSktScanPiopIuTimeisBevice ................................................... 129
16.2u Piopeity kSktScanPiopIuLocalAcknowleugmentBevice ........................ 131
16.21 Piopeity kSktScanPiopIuBataConfiimationBevice ................................. 132
16.22 Piopeity kSktScanPiopIuBatteiyLevelBevice .......................................... 134
16.2S Piopeity kSktScanPiopIuLocalBecoueActionBevice ............................... 134
16.24 Piopeity kSktScanPiopIuBluetoothAuuiess ............................................ 135
16.2S Piopeity kSktScanPiopIuStatisticCounteisBevice .................................. 136
16.26 Piopeity kSktScanPiopIuRumbleConfigBevice ....................................... 138
16.27 Piopeity kSktScanPiopIuPiofileConfigBevice ......................................... 140
16.28 Piopeity kSktScanPiopIuBisconnectBevice ............................................. 141
16.29 Piopeity kSktScanPiopIuBataStoieBevice .............................................. 142
16.Su Piopeity kSktScanPiopIuNotificationsBevice .......................................... 143
16.S1 Piopeity kSktScanPiopIuConnectReasonBevice ..................................... 144
16.S2 Piopeity kSktScanPiopIuPoweiStateBevice ............................................ 145
16.SS Piopeity kSktScanPiopIuStait0pRoleSPPBevice .................................... 146
16.S4 Piopeity kSktScanPiopIuConnectionBeepConfigBevice ......................... 148
16.35 Property kSktScanPropIdFlashDevice .......................................................... 149
16.36 Property kSktScanPropIdOverlayViewDevice ............................................. 149
17 ScanAPI Eiioi hanuling anu uefinitions ........................................................... 153
17.1 Eiioi coues .................................................................................................. 155
18 Symbologies Enumeiation ................................................................................. 158
19 Bata confiimation featuie ................................................................................. 159
2u Sample hanuling asynchionous events of ScanAPI ......................................... 160
21 SktScanAPI0wneiship (available foi }ava platfoims) ..................................... 166
21.1 Constiuctoi .................................................................................................. 167
21.2 iegistei ......................................................................................................... 168
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 6/183
21.S uniegistei .................................................................................................... 170
21.4 askFoi0wneiship ........................................................................................ 171
21.S claim0wneiship .......................................................................................... 172
21.6 ielease0wneiship ....................................................................................... 174
21.7 Notification onScanApi0wneishipChange ................................................ 175
22 SoftScan feature ...................................................................................................... 178
22.1 Usage ............................................................................................................ 178
22.2 iOS integration. ............................................................................................. 179
22.3 Android integration ....................................................................................... 180
23 History ..................................................................................................................... 180

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 7/183

1 "#$%%*, #3%%*#6G3% 3L*,LG*M

This SDK is designed for use with the Socket CHS 7 series scanners on several
OS platforms including Apple iOS, Android, RIM, Windows Desktop and Windows
Mobile 6.x. The intended usage is to develop a native application that includes
built in support for the Socket 7 series scanners. This SDK gives the full
programmatic access to a connected 7 series scanner to customize the scanner
Symbology and data support, manages scanner feedback messages and
functions or modifies default scanner behavior.

Before beginning the process of implementing the ScanAPI into an application it
is first recommended reading through this intro regarding the connection process
of the scanner as this might answer many questions in regards to how an
application communicates with the scanner.

1.1 Scanner connection information

The connection information below applies mainly to the Android, RIM and
Windows operating systems.

For the iOS platform the connection is simplified based on the host iOS handling
the connection. It is recommended to refer to the readme.rtf file from the ScanAPI
SDK DMG install that is part of the ScanAPI iOS SDK..

1.1.1 Scanner HID mode

The CHS 7 series scanners are shipped by default in HID profile mode and will
display the following friendly name:

For the 7Xi/7Qi series:
Socket 7Xi [xxxxxx] (where xs are the last 6 digits of the BD address of the
scanner)

Or for the 7Ci/Mi/Pi & 8Ci series:

Socket CHS [xxxxxx]

In this mode the scanner functions as a standard HID keyboard device and can
be tested in this mode as if it is a keyboard.
It will NOT work with an application using ScanAPI.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 8/183

NOTE: if the scanner in HID mode is discovered and tested it may cause conflicts
with discovering and using the scanner in SPP mode due to the fact that some
devices will cache the name and service information of the device.

Socket recommends that the pairing information is removed by deleting or
unpairing the device using the host device Bluetooth manager before connecting
the scanner in a different mode.


1.1.2 SPP Mode for the SDK

The SPP Mode is the required mode for the Scanner to be able to communicate
with an application using ScanAPI.

The SPP Mode has 2 configurations. One configuration called Acceptor, and
another called Initiator.

In Acceptor configuration, the scanner is discoverable and connectable and
basically waits for a host to connect. The scanner indicates that it is in this mode
by a slow blue LED flashing.

In Initiator configuration, the scanner knows the Bluetooth address of the host to
connect to.
Each time the scanner is powered on in this configuration, it will try to connect to
the host corresponding to the Bluetooth address it has in memory.

The scanner indicates that it is in this mode by a fast blue LED flashing. The
scanner stays in this mode until it successfully connects to the host or after a
2minutes timeout occurs, which it will signal by doing a long beep.
At this point the scanner can be powered off and on to retry to connect to the
host.

1.1.3 Initial connection to iOS host or to any host for a 7Ci,M and P
series
The process of connecting a scanner to an iOS host device or a 7Ci, M and P
scanner to any host device is the same and can be summarized to these simple
steps.
Step 1: The scanner must be in Acceptor mode.
For an iOS device, the scanner can be in configured in Acceptor mode by
scanning a barcode that has the value of #FNC IOS ACCEPTOR
000000000000# for a 7Xi/7Qi or #FNB00F40002# for a 7Ci/Mi/Pi/8Ci.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 9/183

For any other host Device (not iOS) the scanner can be configured in Acceptor
mode by scanning a barcode that has the value of #FNB00F40000# for a
7Ci/Mi/Pi/8Ci series, or #FNC SPP ACCEPTOR 0000000000# for a 7Xi/7Qi
series scanner.

The barcode can be a 2D barcode for a 7Xi/7Qi scanner only.

Step 2: Discover and pair the scanner from the host.
By using the Bluetooth settings of your host device, discover and pair the
scanner. If a PIN code is request use 0000 (4 zeros) and the pairing should
complete.
For iOS host device this is the final step. The scanner can now be used by the
application using ScanAPI.

Step 3: (For all hosts but iOS devices) Instruct the scanner to connect back to the
host by using Socket EZ Pair application.

Once the scanner is configured correctly, it will always try to reconnect back to
the host each time it is powered on or back in range.

1.1.4 Simplified connection process to any host but iOS devices
There is a simplified process that can be used when the host Bluetooth device
address is known either by printing out barcode or by using 7xi/7Qi with Socket
EzPair.

This process isnt possible for iOS device as there is no API to retrieve the iOS
Bluetooth address and the iOS devices wont authorize a scanner to connect and
pair unless the Bluetooth Settings page is displayed on the screen.

The following steps for 7Xi/7Qi series is as simple as scanning a 2D barcode that
has the value: #FNC SPP INITIATOR xxxxxxxxxxxx# with xxxxxxxxxxxx
replaced by the host Bluetooth address, with letters in upper case, or by scanning
out of the Socket EZ Pair screen the 2D barcode.

The same principle for 7Ci/Mi/Pi/8Ci series scanner, by scanning a Code 128
barcode that has the value: #FNIxxxxxxxxxxxx# with xxxxxxxxxxxx replaced by
the host Bluetooth address. NOTE the 7Ci/Mi/Pi/8Ci series scanners should be
first and only once set to SPP mode by scanning the #FNB00F40000# Code
128 barcode.


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 10/183
1.1.5 Connection Process integration

For the 7Ci/Mi/Pi/8Ci series scanners there are two methods that canbe used to
configure the scanner to be an initiator to the host device:

Method 1:
Implement the 1D EZ Pair process in your app to select a pre-discovered
scanner and configure it to be an initiator to the host device. This process is
explained in paragraph 8.6 Socket EZ Paii featuie.

Method 2:
-Manually create an EZ Pair barcode with each host system Bluetooth address
so that the 1D scanner simply needs to scan the barcode to configure it as an
initiator to the host device

For the 7Xi/7Qi series scanners you can just present the EZ pair barcode as part
of your application setup process.

Either way once that part is done your app just needs to have ScanAPI initialized
and waiting to receive the incoming connection of the scanner.


/ "#$%&'( (%6,3N4#6G3%
ScanAPI ueliveis an application piogiamming inteiface (API) to contiol anu
configuie Socket !"#$%&&%' Coiuless Banuleu Scanneis (CBS) connecteu to a host
computei.

A ScanApi Belpei component is pioviueu foi 0bjective C, C# anu }ava platfoims to
integiate moie easily ScanAPI into an application. ScanAPI Belpei hanules the
asynchionous events thiough callbacks, anu gives an easy way to manipulate the
asynchionous commanus an application can senu to a CBS by pioviuing a callback
mechanism that is invokeu when the commanu iesponse is ieceiveu.

A CBS has seveiall piopeities that can be ietiieveu, mouifieu oi actioneu.
CBS piopeities can be by example a symbology state, its fiienuly name, oi tiiggeiing
a scan.

This API is asynchionous. The piopeity opeiation is theiefoie a 2-step piocess. The
application senus a piopeity get oi set commanu anu if this is successful, a piopeity
get oi set complete event is ieceiveu with the CBS iesult of that piopeity commanu.

At any time a CBS can senu events to the host that aie ietiieveu using the same
mechanism as the completion of the piopeity opeiation.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 11/183

ScanAPI has only one entiy point to ieceive these asynchionous events making it
veiy easy to manage.

The othei benefit of this asynchionous API is to be able to uiive a scannei fiom a
giaphical usei inteiface (u0I) application without uangei of blocking the usei
inteiface while waiting foi a lengthy opeiation to complete.

3 SoftScan Feature
The SoftScan is a featuie that makes the host uevice built-in cameia acting as a
baicoue scannei. This featuie is implementeu using thiiu-paity technology anu
theiefoie the uevelopei shoulu comply to the thiiu-paity license agieement.

Cuiiently the SoftScan featuie is available on foi i0S anu Anuioiu baseu uevices.

This featuie is not activateu by uefault. In oiuei to activate it, the application shoulu
set the ScanAPI kSktScanPiopIuSoftScanStatus to kSktScanSuppoiteu, anu then set
the same piopeity to kSktScanEnableuSoftScan

As soon as ScanAPI is initializeu anu SoftScan is enableu, a SoftScannei uevice
aiiival event is geneiateu.
A uevice iemoval event is geneiateu when the SoftScan featuie is uisableu by using
the same ScanAPI piopeity with its value sets to kSktScanBisableSoftScan.

The SoftScannei uoesn't suppoit all the piopeities uesciibeu in this uocument anu
ietuins a ESKT_N0TS0PP0RTEB eiioi foi them.

An application can tuin off this featuie by setting the piopeity
kSktScanPiopIuSoftScanStatus to kSktScanNotSuppoiteu. This will ietuin an eiioi
ESKT_INvALIB0PERATI0N if the SoftScan is not uisableu fiist.

3.1 Licensing requirements
The thiiu-paity useu foi implementing the SoftScan featuie is ReuLasei fiom EBay
Coipoiation. The ReuLasei iequiies a license to be puichaseu in oiuei to offei
unlimiteu scan. Without the license the SoftScannei is limiteu to 2S scans on a
paiticulai host.
The License shoulu be puichase on ReuLasei poital, anu the license file shoulu be
pait of the application package.
3.2 iOS requirements
The ScanAPI libiaiy foi i0S is split in to 2 veisions; one that suppoits the SoftScan
featuie anu one that uoesn't.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 12/183
In the veision that uoesn't suppoit the SoftScan featuie the iequiieu fiamewoiks
aie:
- ExteinalAccessoiy.fiamewoik

In the veision that uoes suppoit the SoftScan featuie the extia fiamewoiks iequiieu
aie:

- AvFounuation.fiamewoik,
- AuuioToolbox.fiamewoik
The SoftScan veision of ScanAPI iequiies a minimal taiget uevice i0S veision of 7.u.
If the application has to suppoit oluei veision of i0S, then the ScanAPI without
SoftScan featuie must be useu.

Last, in oiuei to have the SoftScan making a beep, the app iesouices bunule shoulu
contain a wav file nameu softscanbeep.wav. 0ne is pioviueu with the SBK but it can
be ieplaceu by anything othei wav file as long as it has the same file name.
If this file is not piesent the SoftScan won't beep when a baicoue has been
successfully uecoueu.
3.3 Android requirements
The oveilay view is a iequiiement foi the SoftScannei in oiuei to uisplay the viueo
output in the application. This is implementeu thiough an Activity that must be
auueu to the application manifest. This activity is uefineu as
com.SocketNobile.ScanAPI.SoftScanActivity.

The manifest shoulu also have the following peimissions:
- anuioiu.peimission.CANERA,
- anuioiu.peimission.ACCESS_NETW0RK_STATE
- anuioiu.peimission.INTERNET

A specific layout shoulu be cieateu that will be uisplayeu as the oveilay view of the
SoftScan. This layout can have a white iectangle that is calleu a "view Finuei" that is
useu as a scanning guiue but also is use by the softscan scannei to impiove the
baicoue iecognition in this iegion. The "view Finuei" IB can be passeu in the hash
table of the kSktScanPiopIu0veilayviewBevice piopeity. A flash button can be
auueu as well anu its IB shoulu be also specifieu in the same hash table of the same
piopeity. If the flash featuie is not available the SoftScan scannei will uisable it
automatically.

The ReuLasei libiaiies must be auueu to the Anuioiu application. The simplest way
foi uoing this is to copy the ieulaseisuk.jai anu the aimeabilibieulasei.so in the
"libs" uiiectoiy of the Anuioiu application. That "libs" subuiiectoiy is automatically
taking in consiueiation by Anuioiu Bevelopment tools (ABT 18 oi highei).


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 13/183
- <3%#*O6
This API uefines S main objects: ScanAPI object, Bevice object anu Scan0bject.

4.1 ScanAPI object
This object contiols the API.

In oiuei to use ScanAPI, this object must be openeu fiist anu this fiist open
initializes ScanAPI. The hanule ietuineu fiom this open must be useu foi any
subsequent ScanAPI opeiations.

All asynchionous events aie ieceiveu thiough this ScanAPI object.

The ScanAPI object has few piopeities that can be ietiieveu oi mouifieu.

When an application is ieauy to use ScanAPI, it can open it by using the ScanAPI
0pen API with no uevice name in the paiametei.
4.2 Device object
The Bevice object iepiesents a CBS. In oiuei to use anu ieceive events fiom a CBS,
its coiiesponuing Bevice object must be openeu.

The hanule ietuineu fiom opening a Bevice object is useu by the application to
ietiieve oi mouify a paiticulai piopeity of the CBS.

ScanAPI notifies the application each time a Bevice 0bject is available by senuing a
Bevice Aiiival event with a 00IB iuentifying the Bevice 0bject. The application can
open this paiticulai Bevice 0bject by specifying this 00IB in the ScanAPI open API.

If a CBS uisconnects fiom the host, a Bevice Removal is sent by ScanAPI to the
application to inuicate that the matching Bevice 0bject is no longei valiu anu the
application shoulu close it if it has it openeu.

4.3 ScanObject
The Scan0bject is a uata placeholuei useu foi exchanging infoimation between the
application anu the CBS oi ScanAPI object.

A Scan0bject holus 2 kinus of infoimation: a piopeity anu a message.

When a Scan0bject is sent fiom the application to ScanAPI, only the piopeity
infoimation in Scan0bject is ielevant.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 14/183
When a Scan0bject is ieceiveu fiom ScanAPI by the application, the message
infoimation is always ielevant anu uepenuing on the message ieceiveu the piopeity
infoimation might be ielevant.

ScanAPI cieates a Scan0bject each time it ieceives an asynchionous event, anu in
this case the application must ielease this Scan0bject by calling a ScanAPI ielease
API.

The application can cieate a Scan0bject to senu specific infoimation to eithei a
Bevice oi ScanAPI. In this case the application is iesponsible foi ieleasing the
Scan0bject coiiectly.




!"! #$%&' )*+&,-.

An application has two things to uo in oiuei to setup ScanAPI coiiectly. It neeus fiist
to open ScanAPI by specifying no name in the open paiametei API, anu then staits
eithei a timei oi a thieau to consume the asynchionous events coming fiom
ScanAPI.

When a CBS connects to the host, ScanAPI senus a Bevice Aiiival event to the
application thiough the application ScanAPI consumei logic.

The Bevice Aiiival event contains an 00IB iuentifying a Bevice 0bject that
iepiesents a CBS. The application can open the Bevice 0bject by specifying this
00IB in the ScanAPI open function.

0nce the Bevice 0bject is openeu, the application can ietiieve oi mouify the CBS
piopeities by using the get piopeity oi set piopeity API.

The get piopeity anu set piopeity APIs aie asynchionous. These APIs ietuin
success if the piopeity has been sent coiiectly to the CBS. The piopeity completion
event is ieceiveu in the application consumei.

If the CBS uoesn't iesponu to a get oi set piopeity within the timeout peiiou (about
S seconus), foi whatevei ieason, a matching piopeity get oi set complete event is
geneiateu with a timeout eiioi.

0nly one piopeity can be sent at the time to the CBS. An eiioi occuis if a piopeity is
sent piioi the completion of the pievious piopeity opeiation.


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 15/183
ScanAPI senus a Bevice Removal event when a CBS uisconnects fiom the host. The
application shoulu close the matching Bevice 0bject if it has it openeu.

4.5 ScanAPI configuration
ScanAPI has one thieau listening on a seiial communication poit. This configuiation
can be ietiieveu oi mouifieu by cieating a Scan0bject anu setting its piopeity to
ScanAPI configuiation piopeity. The Scan0bject can be sent to ScanAPI using the get
piopeity oi set piopeity API to iespectively ietiieve oi mouify this piopeity.

Nouifying the ScanAPI configuiation will piompt the listenei thieau to iestait. An
eiioi event is geneiateu if the configuiation is incoiiect.

Each time the listenei staits, a Listenei Stait event is geneiateu.

ScanAPI uiops the connection to a CBS if it was connecteu uuiing the piocess of
changing the ScanAPI configuiation.

Please iefei to the ScanAPI object piopeities paiagiaph foi moie infoimation.
!"/ 012 34 )12 + 54351426

The ScanAPI object anu the Bevice object have both piopeities that can be ietiieveu
oi alteieu by using the get piopeity oi set piopeity API.

The piocess of getting oi setting a piopeity is simple. A Scan0bject holus a Piopeity
fielu. The application must cieate a Scan0bject instance anu fill its Piopeity membei
accoiuing to the piopeity of the object it woulu like to mouify.

A piopeity has an IB, a uata type, uata value anu a context. They must be specifieu
accoiuingly to the chaiacteiistics of the piopeity that neeus to be ietiieveu oi
mouifieu.
The context is a fielu an application can use foi maintaining a context. This context is
ietuineu when a piopeity set oi get opeiation completes.

0nce the piopeity membei of the Scan0bject has been filleu coiiectly, the
application can call the get oi set API with the iefeience of the object to which it
wishes to ietiieve oi mouify the piopeity.

If the API ietuins success, the application can wait foi the completion to be ieceiveu
thiough the wait API.

An application cannot senu multiple piopeities to the same object befoie the
pievious set oi get piopeity opeiation has been fully completeu. An eiioi is
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 16/183
geneiateu uuiing the Set oi uet API call if the pievious piopeity of the same object
hasn't been completeu yet.

The application ieceives the complete event thiough its ScanAPI consumei logic that
uses the wait API with the ScanAPI object iefeience.

A Scan0bject that is ieceiveu fiom ScanAPI has always its message fielu filleu out.

The piopeity complete event is ieceiveu in a Scan0bject with a Nessage IB set to a
uet Complete IB oi Set Complete IB.

The Nessage has a iesult fielu that inuicates if the completion of the get oi set
piopeity has been successful oi not. The Piopeity membei of the Scan0bject
contains the Piopeity IB matching to the one that has been set, anu in case of
success, the uata type anu value aie filleu as expecteu.

An impoitant point is the fact that a piopeity set oi get can fail foi many ieasons,
anu some of them will iequiie the application to ietiy the opeiation anu some
shoulu just be taken into consiueiation. Foi example, if a piopeity ietuins a
REQ0EST TINE00T eiioi because the scannei is out of the iange foi a biief instant
oi busy ieceiving uecoueu uata, having ietiy logic can fix this issue.

!"7 89+:5;1 3< $1&=%&' + *3::+&=

This section uesciibes the steps foi senuing a commanu to a uevice.

Let's imagine an application using ScanAPI has a button on its 0I to tiiggei a scan.

Foi claiity puiposes we assume the application coiiectly hanules the connection of
the scannei anu has kept a hanule to ScanAPI anu to this scannei accessible.

The application has ScanAPI consumei logic that will ieceive the messages fiom
ScanAPI.
This consumei logic uses the wait API with the ScanAPI object iefeience that has
been pieviously openeu with the open API with N0LL as uevice name.

The button hanulei cieates a Scan0bject, anu fills the Piopeity pait with a piopeity
IB set to kSktScanPiopIuTiiggeiBevice, a piopeity type set to byte, anu the piopeity
byte value set to kSktScanTiiggeiStait as explaineu in the paiagiaph 18JP ',3O*,6Q
D"D6"#$%',3O(NA,GRR*,2*LG#*.

This button hanulei uses the set API to senu this piopeity to the uevice iuentifieu by
its iefeience. If the ietuin coue of this API is successful, the button hanulei can then
uisable the tiiggei button inuicating the tiiggei is in piogiess.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 17/183

The application's ScanAPI consumei logic that was waiting foi ScanAPI messages by
using the wait API shoulu ieceive the Set Complete message with the piopeity IB set
to kSktScanPiopIuTiiggeiBevice.

The iesult inuicates if the tiiggei woikeu. At that point the uevice shoulu have the
aim light tuineu on anu shoulu be ieauy to scan anu uecoue uata. The application
tiiggei button can then be enableu.

<SS "34,#* #3N* K$5OH*T

voiu CNyAppBlg::0nTiiggeiButton()
{
SKTRES0LT Result=ESKT_N0ERR0R;

TSktScan0bject Scan0bj;
memset(&Scan0bj,u,sizeof(Scan0bj));
initialize a Scan0bject to
tiiggei the uevice
Scan0bj.Piopeity.IB=kSktScanPiopIuTiiggeiBevice;
Scan0bj.Piopeity.Type=kSktScanPiopTypeByte;
Scan0bj.Piopeity.Byte=kSktScanTiiggeiStait;

set the piopeity with the
uevice hanule
Result=SktScanSet(m_hBevice,&Scan0bj);

check the Set iesult
if(SKTS0CCESS(Result))
m_TiiggeiBtn.Enable(FALSE);
else
{
uisplay an eiioi message
BisplayEiioi(_T("0nable to tiiggei: %u"),Result);
}
}

SKTRES0LT CNyAppBlg::Consume(
IN SKTBANBLE hScanAPI,
IN unsigneu long ulTimeoutInNilliseconus,
00T B00L* pbContinue)
{
SKTRES0LT Result;
TSktScan0bject* pSkt0bject=N0LL;
Result=SktScanWait(hScanAPI,&pSkt0bject,ulTimeoutInNilliseconus);
if(SKTS0CCESS(Result))
{
if(Result!=ESKT_WAITTINE00T)
{
if(pSkt0bject)
{
switch(pSkt0bject->Nsg.NsgIB)
{
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 18/183
case kSktScanNsgIuBeviceAiiival:
Result=BanuleBeviceAiiival(pSkt0bject);
bieak;
case kSktScanNsgIuBeviceRemoval:
Result=BanuleBeviceRemoval(pSkt0bject);
bieak;
case kSktScanNsgIuTeiminate:
we aie uone with ScanAPI, somebouy
calleu SktSet with Aboit NsgIu
if(pbContinue)
*pbContinue=FALSE; quit the foi
TiaceInfo(_T("Receive a Teiminate Nsg, \
then shutuown the App ieceiving \ thieau"));
bieak;
case kSktScanNsgSetComplete:
case kSktScanNsguetComplete:
Result=
Banuleuet0iSetComplete(pSkt0bject);
bieak;
case kSktScanNsgEvent:
Result=
BanuleAsynchionousEvent(pSkt0bject);
bieak;
uefault:
{
TiaceInfo(_T("unknown Nessage IB \
ieceiveu:ux%x"),
pSkt0bject->Nsg.NsgIB);
}
bieak;
}
ielease the Scan0bj we ieceiveu in the wait
SktScanRelease(hScanAPI,pSkt0bject);
}
}
}
ietuin Result;
}



calleu fiom the ScanAPI consumei logic
that is using SktScanWait API
voiu CNyAppBlg::Banuleuet0iSetComplete(
IN TSktScan0bject* pScan0bj
)
{
switch(pScan0bj->Piopeity.IB)
{
case kSktScanPiopIuTiiggei:
ungiay out the tiiggei btn
m_TiiggeiBtn.Enable(TR0E);
if(!SKTS0CCESS(pScan0bj->Nsg.Result))
{
BisplayEiioi(_T("Faileu to tiiggei: %u"),
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 19/183
pScan0bj->Nsg.Result);
}
bieak;
}
}


<7 K34,#* #3N*T

public paitial class Foim1 : Foim
{
piivate ISktScanApi _scanApi;
piivate ISktScanBevice _uevice;
public Foim1()
{
InitializeComponent();
InitializeScanAPI();
}

piivate voiu buttonTiiggei_Click(object senuei, EventAigs e)
{
cieate a Scan0bject instance
ISktScan0bject scan0bj =
SktClassFactoiy.cieateScan0bject();

Initialize a Scan0bject to
Tiiggei the uevice
scan0bj.Piopeity.IB =
ISktScanPiopeity.piopIu.kSktScanPiopIuTiiggeiBevice;

scan0bj.Piopeity.Type =
ISktScanPiopeity.types.kSktScanPiopTypeByte;

scan0bj.Piopeity.Byte =
ISktScanPiopeity.values.tiiggei.kSktScanTiiggeiStait;

set the piopeity with the uevice
iefeience
long iesult = _uevice.SetPiopeity(scan0bj);
if (SktScanEiiois.SKTS0CCESS(iesult))
{
buttonTiiggei.Enableu = false;
}
else
{
uisplay an eiioi message
BisplayEiioi("0nable to tiiggei: " + iesult);
}
}

timei to checking anu consuming Scan0bject fiom ScanAPI
piivate voiu timeiScanAPIConsumei_Tick(object senuei,
EventAigs e
{
ISktScan0bject scan0bj=null;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 20/183

wait foi ScanAPI Scan0bject
long iesult = _scanApi.WaitFoiScan0bject(out scan0bj, 1u);

if (SktScanEiiois.SKTS0CCESS(iesult))
{
if (iesult != SktScanEiiois.ESKT_WAITTINE00T)
{
int piopIu = scan0bj.Nsg.IB;
switch (piopIu)
{
case ISktScanNsg.kSktScanNsgIuBeviceAiiival:
iesult = BanuleBeviceAiiival(scan0bj);
bieak;
case ISktScanNsg.kSktScanNsgIuBeviceRemoval:
iesult = BanuleBeviceRemoval(scan0bj);
bieak;
case ISktScanNsg.kSktScanNsgIuTeiminate:
we aie uone with ScanAPI, somebouy
calleu Set with kSktScanPiopIuAboit
as Piopeity IB
iesult = BanuleTeiminate(scan0bj);
bieak;
case ISktScanNsg.kSktScanNsguetComplete:
case ISktScanNsg.kSktScanNsgSetComplete:
iesult = Banuleuet0iSetComplete(scan0bj);
bieak;
case ISktScanNsg.kSktScanNsgEvent:
iesult = BanuleEvent(scan0bj);
bieak;
}
ielease the Scan0bject we ieceiveu in the wait
_scanApi.ReleaseScan0bject(scan0bj);
}
}
}

piivate long Banuleuet0iSetComplete(ISktScan0bject scan0bj)
{
long iesult = SktScanEiiois.ESKT_N0ERR0R;
ISktScanPiopeity piopeity = scan0bj.Piopeity;
switch (piopeity.IB)
{
case ISktScanPiopeity.piopIu.kSktScanPiopIuTiiggeiBevice:
ungiey out the tiiggei button
buttonTiiggei.Enableu = tiue;
iesult = scan0bj.Nsg.Result;
if (!SktScanEiiois.SKTS0CCESS(iesult))
{
BisplayEiioi("Faileu to tiiggei: " + iesult);
}
bieak;
}
ietuin iesult;
}
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 21/183





U$L$ K34,#* #3N*T

hanulei foi the Tiiggei button
#H$KK TiiggeiButtonBanulei G5OH*5*%6K Runnable {
O,GL$6* ISktScanBevice _uevice=%4HH;
O,GL$6* ButtonFielu _button;

constiuctoi
O4FHG# TiiggeiButtonBanulei(
ISktScanBevice uevice,
ButtonFielu button)
{
_uevice=uevice;
_button=button;
}

O4FHG# L3GN iun() {

cieate a Scan0bject instance
ISktScan0bject scan0bj=
SktClassFactoiy.*+$,%$-*,./01$*%();

Initialize a Scan0bject to
Tiiggei the uevice
ISktScanPiopeity piopeity=
scan0bj.getPiopeity();

piopeity.setIB(
ISktScanPiopeity.piopIu.
2-2%-*,.3+&4567+899$+:$;8*$);

piopeity.setType(
ISktScanPiopeity.types.
2-2%-*,.3+&47<4$!<%$);

piopeity.setByte(
ISktScanPiopeity.values.tiiggei.
2-2%-*,.7+899$+-%,+%);

set the piopeity with the uevice
iefeience
H3%R iesult=_uevice.SetPiopeity(scan0bj);

check the set iesult
G+(SktScanEiiois.-=7->??@--(iesult)){
_button.setvisualState(A5->BCD-7B7@D:5-B!C@:);
}
*HK*
{
uisplay an eiioi message
BisplayEiioi("0nable to tiiggei: "+iesult);
}
}

}
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 22/183

#H$KK ScanAPIConsumei *V6*%NK TimeiTask {

O,GL$6* ISktScanApi _scanApi;
O,GL$6* AppRef _appRef;
O4FHG# ScanAPIConsumei(ISktScanApi scanApi,AppRef appRef)
{
_scanApi=scanApi;
_appRef=appRef;
}

O4FHG# L3GN iun() {
ISktScan0bject|jscan0bj=%*M ISktScan0bject|1j;

wait foi scanAPI Scan0bject
H3%R iesult=_scanApi.WaitFoiScan0bject(scan0bj,1u);

G+(SktScanEiiois.-=7->??@--(iesult))
{
G+(iesult!=SktScanEiiois.@-=7DEB5775F@/>7)
{
G%6 piopIu=
scan0bj|uj.getNessage().getIB();

KMG6#W(piopIu){
#$K* ISktScanNsg.2-2%-*,.FG956:$;8*$B++8;,":

iesult=
BanuleBeviceAiiival(scan0bj|uj);
F,*$D;

#$K* ISktScanNsg.2-2%-*,.FG956:$;8*$H$I&;,":
iesult=
BanuleBeviceRemoval(scan0bj|uj);
F,*$D;

#$K* ISktScanNsg.2-2%-*,.FG9567$+I8.,%$:
we aie uone with ScanAPI, somebouy
calleu Set with Aboit as NsgIB
iesult=
BanuleTeiminate(scan0bj|uj);
F,*$D;

#$K* ISktScanNsg.2-2%-*,.FG9-$%?&I4"$%$:
#$K* ISktScanNsg.2-2%-*,.FG9J$%?&I4"$%$:
iesult=
Banuleuet0iSetComplete(scan0bj|uj);
F,*$D;

#$K* ISktScanNsg.2-2%-*,.FG9@;$.%:
F,*$D;
}
ielease the Scan0bj we ieceiveu in the wait
_scanApi.ReleaseScan0bject(scan0bj|uj);
}
}
}

calleu fiom the ScanAPI consumei logic
that is using the wait API
O,GL$6* H3%R Banuleuet0iSetComplete(ISktScan0bject scan0bj) {
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 23/183
H3%R iesult=SktScanEiiois.@-=7DK/@HH/H;
ISktScanPiopeity piopeity=scan0bj.getPiopeity();
KMG6#W(piopeity.getIB()){
#$K* ISktScanPiopeity.piopIu.
2-2%-*,.3+&4567+899$+:$;8*$:

ungiay out the tiiggei btn
_appRef.getTiiggeiBtn().
setvisualState(A5->BCD-7B7@DK/HFBC);

iesult=scan0bj.getNessage().getResult();

G+(!SktScanEiiois.-=7->??@--(iesult)){
BisplayEiioi("Faileu to tiiggei: "+iesult);
}
F,*$D;
}
,*64,% iesult;
}

};

=FX*#6GL* < K34,#* #3N*T


-(IBAction)btnClickeu:(iu)senuei{
iu<ISktScan0bject> scan0bj=|SktClassFactoiy cieateScan0bjectj;
||scan0bj Piopeityj setIB:kSktScanPiopIuTiiggeiBevicej;
||scan0bj PiopeityjsetType:kSktScanPiopTypeBytej;
||scan0bj PiopeityjsetByte:kSktScanTiiggeiStaitj;
|_iootviewContiollei AuuPiopeityToSet:scan0bjj;
|_iootviewContiollei SenuFiistPiopeityToSetj;
}

timei hanulei foi consuming Scan0bject fiom ScanAPI
if ScanAPI is not initializeu this hanulei uoes nothing
-(voiu)onTimei{
if(_scanApiInitializeu==tiue){
SKTRES0LT iesult=|_scanapi WaitFoiScan0bject:_scan0bjectReceiveu Time0ut:uj;
if (SKTS0CCESS(iesult)) {
if (iesult!=ESKT_WAITTINE00T) {
|self BanuleScan0bject:_scan0bjectReceiveuj;
|_scanapi ReleaseScan0bject:_scan0bjectReceiveuj;
}
}
}

}



-(voiu) BanuleScan0bject:(iu<ISktScan0bject>)scanobject{
switch (||scanobject Nsgj NsgIBj) {
case kSktScanNsgIuBeviceAiiival:
|self BanuleBeviceAiiival:scanobjectj;
bieak;
case kSktScanNsgIuBeviceRemoval:
|self BanuleBeviceRemoval:scanobjectj;
bieak;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 24/183
case kSktScanNsguetComplete:
|self BouetComplete:scanobjectj;
bieak;
case kSktScanNsgSetComplete:
|self BoSetComplete:scanobjectj;
bieak;
case kSktScanNsgIuTeiminate:
|_scanapi Closej;
bieak;
case kSktScanNsgEvent:
|self BanuleEvent:scanobjectj;
bieak;
uefault:
bieak;
}
}

-(voiu) BouetComplete:(iu<ISktScan0bject>)scan0bject{
SKTRES0LT iesult=ESKT_N0ERR0R;
if (scan0bject!=nil) {

iesult=||scan0bject NsgjResultj;
iu<ISktScanPiopeity> piopeity=|scan0bject Piopeityj;
int IB=|piopeity getIBj;
switch (IB) {
case kSktScanPiopIuFiienulyNameBevice:
iesult=|self 0nFiienulyName:scan0bjectj;
bieak;
case kSktScanPiopIuBluetoothAuuiessBevice:
iesult=|self 0nBtAuuiess:scan0bjectj;
bieak;
case kSktScanPiopIuBeviceType:
iesult=|self 0nScanneiType:scan0bjectj;
bieak;
case kSktScanPiopIuveisionBevice:
iesult=|self 0nScanneiFiimwaie:scan0bjectj;
bieak;
case kSktScanPiopIuBatteiyLevelBevice:
iesult=|self 0nBatteiyLevel:scan0bjectj;
bieak;
case kSktScanPiopIuLocalBecoueActionBevice:
iesult=|self 0nBecoueAction:scan0bjectj;
bieak;
case kSktScanPiopIuCapabilitiesBevice:
iesult=|self 0nCapabilitiesBevice:scan0bjectj;
bieak;
case kSktScanPiopIuPostambleBevice:
iesult=|self 0nPostambleBevice:scan0bjectj;
bieak;
case kSktScanPiopIuSymbologyBevice:
iesult=|self 0nSymbologyInfo:scan0bjectj;
bieak;
uefault:
bieak;
}

senu a notification to upuate the piogiess bai
||NSNotificationCentei uefaultCenteij postNotificationName:"msg_name" object:nil
useiInfo:nilj;

anu senu the next piopeity if theie is one
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 25/183
|self SenuFiistPiopeityFiomListj;
}
}

-(voiu) BoSetComplete:(iu<ISktScan0bject>)scan0bject{
SKTRES0LT iesult=ESKT_N0ERR0R;
if (scan0bject!=nil) {
iesult=||scan0bject NsgjResultj;
senu a notification to upuate the piogiess bai
||NSNotificationCentei uefaultCenteij postNotificationName:"msg_name" object:nil
useiInfo:nilj;
_piopeitySetPenuing=N0;
anu senu the next piopeity if theie is one
|self SenuFiistPiopeityToSetj;
}
}




!"> ?+&=;%&' +$6&*@43&3A$ 1B1&2$ 34 *3:5;12%3& 1B1&2$
The ScanAPI object maintains a queue to ieceive asynchionous events anu piopeity
opeiation complete events waitting foi the application to consume them.

An application can ietiieve these events by using the wait API.
This API ietuins a Scan0bject that will neeu to get ieleaseu once the application is
uone with it by calling the ielease API.

The wait API ietuins immeuiately if theie is an event in the queue, oi it will wait the
specifieu input paiametei time if the queue is empty.

Completion events oi asynchionous events can aiiive at any time anu in any oiuei.

The iecommenueu way foi hanuling these events is to cieate a switch statement on
the message IB ieceiveu in the Scan0bject.

Theie aie only 6 possible message types: kSktScanNsgIuBeviceAiiival,
kSktScanNsgIuBeviceRemoval, kSktScanNsgIuTeiminate,
kSktScanNsgSetComplete, kSktScanNsguetComplete anu kSktScanNsgEvent.

Foi each of these message types a hanulei function can be calleu. Insiue the hanulei
function, the Result membei of the Nessage ieceiveu shoulu be checkeu to be suie
the piocess can continue.

The hanulei functions foi the Set Piopeity Complete oi uet Piopeity Complete
event can also have a switch statement on the piopeity IB. If the application useu
the context membei of a piopeity, the same context is then ietuineu in the complete
piopeity.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 26/183
The uecoueu uata oi the CBS button's piess status is ieceiveu in the hanulei
functions foi the messages that have kSktScanNsgEvent as message IB.


!"C D14:%&+2%3&
When ScanAPI is no longei neeueu it can be teiminateu by setting an Aboit piopeity
to the ScanAPI object.

At that point, if theie aie any uevices open, ScanAPI senus a Removal event foi each
of the Bevice objects open, upon which the Bevice object shoulu be closeu by the
application using the close API.

0nce all the Bevice objects have been closeu, ScanAPI senus a Teiminate event anu
at that point it is safe to close ScanAPI.

P "#$%&'( @*HO*, Y$L$GH$FH* +3, U$L$I <7 $%N =FX*#6GL* <Z
ScanAPI Belpei has been cieateu to facilitate the integiation of ScanAPI into an
application.

It is ieleaseu as souice coue anu theiefoie can be highly customizable foi the neeu
of youi application. Some basic anu common featuies aie pioviueu as sample on
how to use ScanAPI.

N0TE: ScanAPI Belpei is available foi }ava, C# anu 0bjective C base coue.

ScanAPI Belpei maintains a list of commanus to senu to ScanAPI. Since piopeities
cannot be sent befoie the completion of the pievious one, it offeis an easy way to
queue the commanus anu pioviues a callback foi each commanu completion.
A commanu in this context is eithei a "Set Piopeity" oi a "uet Piopeity".

By example, if an application wants to ietiieve the fiienuly name anu the veision of
the connecteu uevice, it uses ScanAPIBelpei to uo a "PostuetFiienulyName" anu a
"PostuetBeviceveision" in a iow, anu foi each of these functions, a callback is
passeu, so when the uet Fiienuly Name completes, the callback is calleu anu the
application can iefiesh the 0I with the new fiienuly name, anu it follows the same
logic when uet Bevice veision completes.

It ietiies senuing the commanu up to S times if the commanu completion faileu in
time out eiioi.

The }ava veision of ScanAPI Belpei cieates a timei task to consume asynchionous
Scan0bject coming fiom ScanAPI.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 27/183
The C# anu 0bjective C veision of ScanAPI Belpei uoes not cieate a timei, but
insteau pioviues a methou, BoScanAPIReceive, that has to be calleu fiom a timei
function oi a thieau.

The following paiagiaphs uesciibe the steps iequiieu foi using ScanAPI Belpei.
E"F ?+&=;%&' 2@1 )*+&,-. ?1;514 &32%<%*+2%3&$
Since most of the ScanAPI opeiations aie asynchionous, it is veiy impoitant to setup
a way foi hanuling notifications. ScanAPI Belpei pioviues a
ScanAPIBelpeiNotification inteiface oi a ScanApiBelpeiBelegate piotocol foi
0bjective C enviionment that must be implementeu in oiuei to hanule the vaiious
notifications coiiectly.
Beie is how Scannei Settings foi Anuioiu is using this inteiface:

O,GL$6* ScanApiBelpeiNotification _scanApiBelpeiNotification=%*M ScanApiBelpeiNotification() {
**
* ieceive a notification inuicating ScanAPI has teiminateu,
* then senu an intent to finish the activity if it is still
* iunning
*
O4FHG# L3GN onScanApiTeiminateu() {
_consumeiTeiminateuEvent.set();
G+(_foiceClose0I){
Intent intent=%*M Intent(K/75LMD?C/-@DB?75A57M);
senuBioaucast(intent);
}
}
**
* ScanAPI is now initializeu, if theie is an eiioi
* then ask the activity to uisplay it
*
O4FHG# L3GN onScanApiInitializeComplete(H3%R iesult) {
if ScanAPI coulun't be initializeu
then uisplay an eiioi
G+(!SktScanEiiois.-=7->??@--(iesult)){
_scanApi0wneiship.ielease0wneiship();
Stiing text=getStiing(R.stiing.N,8"$6D%&D8.8%8,"8O$DG*,.,48D$++&+D)+iesult;
Intent intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
intent.putExtia(@P7HBD@HH/HDF@--BJ@,text);
}
}
**
* ask the activity to uisplay any asynchionous eiioi
* ieceiveu fiom ScanAPI
*
O4FHG# L3GN onEiioi(H3%R iesult) {
Stiing text=getStiing(R.stiing.G*,.,48D8GD+$4&+%8.9D,.D$++&+D)+iesult;
Intent intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
intent.putExtia(@P7HBD@HH/HDF@--BJ@,text);
}

**
* a uevice has uisconnecteu. 0puate the 0I accoiuingly
*
O4FHG# L3GN onBeviceRemoval(BeviceInfo ueviceRemoveu) {
_cuiientSelecteuBevice=%4HH;
Intent intent=%*M Intent(K/75LMD-?BKK@HDH@F/ABC);
intent.putExtia(@P7HBD:@A5?@KBF@,ueviceRemoveu.getName());
senuBioaucast(intent);
}

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 28/183
**
* a uevice is connecting, upuate the 0I accoiuingly
*
O4FHG# L3GN onBeviceAiiival(H3%R iesult, BeviceInfo newBevice) {
Intent intent=%4HH;
G+(SktScanEiiois.-=7->??@--(iesult)){
_cuiientSelecteuBevice=newBevice;
intent=%*M Intent(K/75LMD-?BKK@HDBHH5ABC);
intent.putExtia(@P7HBD:@A5?@KBF@,newBevice.getName());
}
*HK*
{
Stiing text=getStiing(R.stiing.$++&+D)+iesult+
getStiing(R.stiing.D6#+8.9D6$;8*$D,++8;,"D.&%8N8*,%8&.);
intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
intent.putExtia(@P7HBD@HH/HDF@--BJ@,text);
}
senuBioaucast(intent);
}
**
* ScanAPI is ueliveiing some uecoueu uata
* ask the activity to uisplay them
*
O4FHG# L3GN onBecoueuBata(BeviceInfo ueviceInfo,
ISktScanBecoueuBata uecoueuBata) {
Intent intent=%*M Intent(K/75LMD:B7BDBHH5ABC);
intent.putExtia(@P7HBD-MF!/C/JMDKBF@,uecoueuBata.getSymbologyName());
intent.putExtia(@P7HBD:@?/:@::B7B,uecoueuBata.getBata());
senuBioaucast(intent);
}
**
* an eiioi occuis uuiing the ietiieval of Scan0bject
* fiom ScanAPI, this is ciitical eiioi anu only a iestait
* can fix this.
*
O4FHG# L3GN onEiioiRetiievingScan0bject(H3%R iesult) {
Intent intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
Stiing text="Eiioi unable to ietiieve ScanAPI message: ";
text+="("+iesult+")";
text+="Please close this application anu iestait it";
intent.putExtia(@P7HBD@HH/HDF@--BJ@,text);
senuBioaucast(intent);
}
};

The same notification hanulei but this time foi the BlackBeiiy veision of Scannei
Settings:

O,GL$6* ScanApiBelpeiNotification _scanApiBelpeiNotification=%*M ScanApiBelpeiNotification() {

O4FHG# L3GN onScanApiTeiminateu() {
System.$Q8%(u);
}

O4FHG# L3GN onScanApiInitializeComplete(H3%R iesult) {
Bisplay an eiioi message inuicating that ScanAPI faileu
to initialize coiiectly
_scanAPIInitEiioi=iesult;
G+(SktScanEiiois.-=7->??@--(iesult)){
KQ%#W,3%G[*N(0iApplication.9$%@;$.%C&*2()){
uelete(_pleaseWaitWhileInitializingScanAPI);
auu(_uisplayBeviceslist);
}
}
*HK*{
0iApplication.9$%>8B44"8*,%8&.().invokeLatei(%*M Runnable() {

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 29/183
O4FHG# L3GN iun() {
KQ%#W,3%G[*N(0iApplication.9$%@;$.%C&*2()){
Status.G'&R("0nable to initialize ScanAPI
("+_scanAPIInitEiioi+")");
_ScanApi=%4HH;
uelete(_pleaseWaitWhileInitializingScanAPI);
auu(%*M LabelFielu("Please iestait this
application",Fielu.L5@C:DS?@K7@H));
}
}
});
}
}

O4FHG# L3GN onEiioiRetiievingScan0bject(H3%R iesult) {
A=2= Auto-geneiateu methou stub

}

O4FHG# L3GN onEiioi(H3%R iesult) {
A=2= Auto-geneiateu methou stub

}

O4FHG# L3GN onBeviceRemoval(BeviceInfo ueviceRemoveu) {
KQ%#W,3%G[*N(0iApplication.9$%@;$.%C&*2()){
ueviceRemoveu.CloseScieenButThis(_this);
G%6 size=_scanApiBelpei.getBevicesList().size();
_uisplayBeviceslist.setSize(size);
}
_ueviceconnecteu=+$HK*;
}

O4FHG# L3GN onBeviceAiiival(H3%R iesult, BeviceInfo newBevice) {
KQ%#W,3%G[*N(0iApplication.9$%@;$.%C&*2()){
G%6 size=_scanApiBelpei.getBevicesList().size();
_uisplayBeviceslist.setSize(size);
}
_ueviceconnecteu=6,4*;
}

O4FHG# L3GN onBecoueuBata(BeviceInfo ueviceInfo,
ISktScanBecoueuBata uecoueuBata) {
G+(_scanwinuow!=%4HH)

_scanwinuow.BoScanneuBata(uecoueuBata.getBata(),uecoueuBata.getSymbologyName());
}

};


The same notification hanulei but this time fiom C# veision of Scannei Settings:
// ScanAPI Helper provides a series of Callbacks
// indicating some asynchronous events have occured
#region ScanApiHelperNotification Members

// a scanner has connected to the host
public void OnDeviceArrival(long result, ScanApiHelper.DeviceInfo newDevice)
{
DoScannerArrival(result,newDevice);
}

// a scanner has disconnected from the host
public void OnDeviceRemoval(ScanApiHelper.DeviceInfo deviceRemoved)
{
DoScannerRemoval(deviceRemoved);

if (DeviceRemovalNotification != null)
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 30/183
DeviceRemovalNotification(deviceRemoved);

// close the progress bar
if (UpdateProgressBarEvent != null)
UpdateProgressBarEvent(true);
}

// a ScanAPI error occurs.
public void OnError(long result, string errMsg)
{
MessageBox.Show("ScanAPI Error: "+Convert.ToString(result) + " ["
+ (errMsg != null ? errMsg : "") + "]",
"Scanner Settings", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

// some decoded data have been received
public void OnDecodedData(ScanApiHelper.DeviceInfo device,
ISktScanDecodedData decodedData)
{
// if somebody (the ScanForm) has registered
// to receive this event then fire the event now
if (DecodedDataEvent != null)
DecodedDataEvent(device, decodedData);
}

// ScanAPI is now initialized and fully functionnal
// (ScanAPI has some internal testing that might take
// few seconds to complete)
public void OnScanApiInitializeComplete(long result)
{
if (SktScanErrors.SKTSUCCESS(result))
{
_bInitialized= true;
}
else
{
MessageBox.Show("SktScanOpen failed!",
"Scanner Settings", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
// ScanAPI has now terminate, it is safe to
// close the application now
public void OnScanApiTerminated()
{
timerScanner.Stop();
_bInitialized = false;
Close();// we can now close this form
}

// the ScanAPI Helper encounters an error during
// the retrieval of a ScanObject
public void OnErrorRetrievingScanObject(long result)
{
MessageBox.Show("Unable to retrieve a ScanAPI ScanObject: " +
Convert.ToString(result),
"Scanner Settings", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

#endregion
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 31/183
The same notification hanulei but this time fiom 0bjective C veision of Scannei
Settings:



/**
* called each time a device connects to the host
* @param result contains the result of the connection
* @param newDevice contains the device information
*/
-(void)onDeviceArrival:(SKTRESULT)result Device:(DeviceInfo*)deviceInfo{
// create a device info object to display the device main
// information in the table view
if (SKTSUCCESS(result)) {
[self.devicelist removeObjectAtIndex:0];
[self.devicelist addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:
[deviceInfo getName], kTitleKey,
@"Connected Scanner", kExplainKey,
deviceInfo, kViewControllerKey,
nil]];
_devicecount++;
_lastConnected=deviceInfo;
_selectedDevice=nil;// for now no device is selected

[self performSelectorOnMainThread:@selector(updateView) withObject:nil waitUntilDone:NO];

}
else {
UIAlertView *alert=[[UIAlertView alloc]
initWithTitle:@"Error"
message:@"Unable to open the scanner"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}

}

/**
* called each time a device disconnect from the host
* @param deviceRemoved contains the device information
*/
-(void) onDeviceRemoval:(DeviceInfo*) deviceRemoved{
// remove the device info from the list
NSDictionary* dico=[self.devicelist objectAtIndex:0];
DeviceInfo* deviceInfo=[dico valueForKey:kViewControllerKey];
[self.devicelist removeObjectAtIndex:0];
if(_selectedDevice==deviceInfo)
_selectedDevice=nil;
_devicecount--;

// add the "No device connected" in the list
[self.devicelist addObject:[NSDictionary dictionaryWithObjectsAndKeys:
@"No device connected", kTitleKey,
@"Connected Scanner", kExplainKey,
nil, kViewControllerKey,
nil]];
[self performSelectorOnMainThread:@selector(updateView) withObject:nil waitUntilDone:NO];


}

/**
* called each time ScanAPI is reporting an error
* @param result contains the error code
*/
-(void) onError:(SKTRESULT) result{

NSString* errstr=nil;
if(result==ESKT_UNABLEINITIALIZE)
errstr=[NSString stringWithFormat:@"ScanAPI is reporting an error %d. Please turn off and on the scanner.",
result];
else
errstr=[NSString stringWithFormat:@"ScanAPI is reporting an error %d", result];


UIAlertView *alert=[[UIAlertView alloc]
initWithTitle:@"Error"
message:errstr
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}



Socket ScanAPI Reference
2014 Socket Mobile, Inc. 32/183



Socket ScanAPI Reference
2014 Socket Mobile, Inc. 33/183
/**
* called each time ScanAPI receives decoded data from scanner
* @param deviceInfo contains the device information from which
* the data has been decoded
* @param decodedData contains the decoded data information
*/
-(void) onDecodedData:(DeviceInfo*) device DecodedData:(id<ISktScanDecodedData>) decodedData{
[_selectedDevice setDecodeData:decodedData];
// if the confirmation mode is set to App then this
// App must confirm it has received the data and the
// scanner then will unlock the trigger for the next scan
if (_dataConfirmationMode==kSktScanDataConfirmationModeApp) {
[_scanApiHelper postSetDataConfirmation:device Target:self Response:nil];
}

}

/**
* called when ScanAPI initialization has been completed
* @param result contains the initialization result
*/
-(void) onScanApiInitializeComplete:(SKTRESULT) result{
if(SKTSUCCESS(result)){
// replace the text by No Device Connected
[self.devicelist removeObjectAtIndex:0];
[self.devicelist addObject:[NSDictionary dictionaryWithObjectsAndKeys:
@"No device connected", kTitleKey,
@"Connected Scanner", kExplainKey,
nil, kViewControllerKey,
nil]];
[self performSelectorOnMainThread:@selector(updateView) withObject:nil waitUntilDone:NO];

// set the confirmation mode to be local on the device (more responsive)
[_scanApiHelper postSetConfirmationMode:_dataConfirmationMode Target:self
Response:@selector(onSetProperty:)];

}
else{
UIAlertView *alert=[[UIAlertView alloc]
initWithTitle:@"Error"
message:[NSString stringWithFormat:@"Unable to
initialize ScanAPI: %d",result]
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
[self.devicelist removeObjectAtIndex:0];
[self.devicelist addObject:[NSDictionary dictionaryWithObjectsAndKeys:
PLEASE_RESTART_THIS_APP,
kTitleKey,
@"Connected Scanner", kExplainKey,
nil, kViewControllerKey,
nil]];
[self performSelectorOnMainThread:@selector(updateView) withObject:nil waitUntilDone:NO];
}
}

/**
* called when ScanAPI has been terminated. This will be
* the last message received from ScanAPI
*/
-(void) onScanApiTerminated{
[_scanApiHelper close];
}

/**
* called when an error occurs during the retrieval
* of a ScanObject from ScanAPI.
* @param result contains the retrieval error code
*/
-(void) onErrorRetrievingScanObject:(SKTRESULT) result{
[self Debug:[NSString stringWithFormat:@"Error retrieving ScanObject from ScanAPI:%d",result]];
}



Socket ScanAPI Reference
2014 Socket Mobile, Inc. 34/183
E"G )12 )*+&,-. ?1;514 &32%<%*+2%3&
ScanAPI Belpei must be instiucteu to use youi notification hanulei object anu this
can be accomplisheu by calling the setNotification methou (oi setBelegate in
0bjective C) with the iefeience to the notification inteiface implementation.
_scanApiBelpei.setNotification(_scanApiBelpeiNotification);
This is impoitant to use this function piioi calling the open function to be suie to
tiap all the notifications.
E"H I51& )*+&,-. ?1;514
0nce the ScanAPI Belpei object has been instantiate by using the new function, it
can then be open using the open() methou. The open() methou uoesn't ietuin
anything but insteau the onScanApiInitializeComplete notification will be calleu
once the ScanAPI initialization piocess has been completeu. A iesult coue inuicates
how successful the initialization was.
Example:
_scanApiBelpei.open();

E"! J;3$1 )*+&,-. ?1;514
0nce the application is uone with ScanAPI, it can close it by calling the close methou
of the ScanAPIBelpei object as shown below:
_scanApiBelpei.close();

The close methou uoesn't ietuin any value, but the notification
onScanApiTeiminateu will be calleu when ScanAPI has effectively shutuown.

E"E )*+&&14 +44%B+;
When a scannei connects to the host, ScanAPI Belpei notifies the application using
the onBeviceAiiival notification anu specifies a iesult coue, anu in case of success it
also specifies the uevice infoimation (fiienuly name, uevice type). ScanAPI Belpei
keeps the uevice infoimation object into its uevices list. The application can ietiieve
this list at any time. In oui Scannei Settings SBK sample application foi Anuioiu
platfoim, this notification asks the activity to iefiesh with the new scannei
infoimation oi in case of an eiioi, it uisplays an eiioi message as uesciibeu below:
**
* a uevice is connecting, upuate the 0I accoiuingly
*
O4FHG# L3GN onBeviceAiiival(H3%R iesult, BeviceInfo newBevice) {
Intent intent=%4HH;
G+(SktScanEiiois.-=7->??@--(iesult)){
_cuiientSelecteuBevice=newBevice;
intent=%*M Intent(K/75LMD-?BKK@HDBHH5ABC);
intent.putExtia(@P7HBD:@A5?@KBF@,newBevice.getName());
}
*HK*
{
Stiing text=getStiing(R.stiing.$++&+D)+iesult+
getStiing(R.stiing.D6#+8.9D6$;8*$D,++8;,"D.&%8N8*,%8&.);
intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 35/183
intent.putExtia(@P7HBD@HH/HDF@--BJ@,text);
}
senuBioaucast(intent);
}


E"/ K1*3=1= =+2+ &32%<%*+2%3&

Each time a scannei uecoues coiiectly a baicoue, ScanAPI Belpei calls the
onBecoueuBata notification with the uevice infoimation object anu the uecoueu
uata. In the Scannei Settings foi Anuioiu case the activity that has iegisteieu foi the
N0TIFY_BATA_ARRIvAL intent will ieceive anu uisplay the uecoueu uata. This
activity is the ScanWinuowActivity.
Beie is the coue extiact fiom Anuioiu Scannei Settings foi this notification:

**
* ScanAPI is ueliveiing some uecoueu uata
* as the activity to uisplay them
*
O4FHG# L3GN onBecoueuBata(BeviceInfo ueviceInfo,
ISktScanBecoueuBata uecoueuBata) {
Intent intent=%*M Intent(K/75LMD:B7BDBHH5ABC);
intent.putExtia(@P7HBD-MF!/C/JMDKBF@,uecoueuBata.getSymbologyName());
intent.putExtia(@P7HBD:@?/:@::B7B,uecoueuBata.getBata());
senuBioaucast(intent);
}

The BlackBeiiy veision of Scannei Settings onBecoueuBata looks like this:

O4FHG# L3GN onBecoueuBata(BeviceInfo ueviceInfo,
ISktScanBecoueuBata uecoueuBata) {
G+(_scanwinuow!=%4HH)

_scanwinuow.BoScanneuBata(uecoueuBata.getBata(),uecoueuBata.getSymbologyName());
}


E"7 )*+&&14 41:3B+;
When a scannei uisconnects fiom the host, the ScanAPI Belpei notifies the
application by calling the notification onBeviceRemoval. 0sually the application
upuates its 0I to ieflect that change. The Scannei Settings foi Anuioiu senus an
Intent to the Activity that has iegisteieu foi it, as shown in the following lines:
**
* a uevice has uisconnecteu. 0puate the 0I accoiuingly
*
O4FHG# L3GN onBeviceRemoval(BeviceInfo ueviceRemoveu) {
_cuiientSelecteuBevice=%4HH;
Intent intent=%*M Intent(K/75LMD-?BKK@HDH@F/ABC);
intent.putExtia(@P7HBD:@A5?@KBF@,ueviceRemoveu.getName());
senuBioaucast(intent);
}

The BlackBeiiy Scannei Settings veision uoes something similai:
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 36/183
O4FHG# L3GN onBeviceRemoval(BeviceInfo ueviceRemoveu) {
KQ%#W,3%G[*N(0iApplication.9$%@;$.%C&*2()){
ueviceRemoveu.CloseScieenButThis(_this);
G%6 size=_scanApiBelpei.getBevicesList().size();
_uisplayBeviceslist.setSize(size);
}
_ueviceconnecteu=+$HK*;
}

E"> .$ 2@141 + *3&&1*21= )*+&&14
At any point of time, the application can inteiiogate ScanApi Belpei to know if theie
is at least one uevice connecteu by using the following methou:
_scanApiBelpei.isBeviceConnecteu();

This might be useful to know what application menu shoulu be uisplayeu by
example, which coulu change in function of the connection status.
E"C 012 2@1 ;%$2 3< $*+&&14$
The list of connecteu scannei iefeience can be ietiieveu by using the getBevicesList
methou.
E"FL M3 K1B%*1 J3&&1*21= %21:
In some occasion the application might want to uisplay a specific text when no
uevice is connecteu. The ScanAPI Belpei methou setNoBeviceText() allows the
application to specify a text that will be useu to uisplay the only item of the uevices
list when no scannei is connecteu.



8 (2C (%6*R,$6G3%
/"F JNJOO P14$%3&
ScanAPI has been compileu with Niciosoft visual Stuuio 2uu8. vS2uu8 is useu
because it is the last veision that suppoit Winuows Nobile. The inclusion of ScanAPI
in this enviionment in youi CC++ pioject can be uone in 2 ways; by auuing the
following lines in youi souice file uiiectly:
#incluue "<SBK Install Path>\incluue\ScanAPI.h"
#piagma comment("lib","<SBK Install Path>\\lib\ScanAPI.lib"
0i by auuing only the incluue line in youi souice file anu by auuing the lib file in
youi Pioject Link input settings.

/"G Q+B+ P14$%3&
ScanAPI has been compileu using Eclipse ualileo (veision S.S).
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 37/183
ScanAPI is composeu of two }AR files locateu unuei the lib uiiectoiy of the SBK }ava
poition.

Following aie the steps iequiieu in oiuei to incluue ScanAPI into youi pioject anu
woikspace.

8J/J1 "*66G%R 4O 6W* C#HGOK* M3,DKO$#*
Fiom Eclipse select the menu Winuow Piefeiences.
Foi a BlackBeiiy taiget, select fiom the left tiee contiol the path }ava\Builu
Path\0sei Libiaiies
Choose the "Impoit." button anu biowse to wheie ScanAPI_SBK is installeu to
select the ScanAPI_SBK.usei libiaiies file. Check the ScanAPIBlackBeiiy option anu
click 0K.

Foi an Anuioiu taiget, select on the left tiee contiol the path }ava\Builu
Path\Classpath vaiiables. Click on the "New." button anu type in the Name fielu:"
ScanAPI_Libs" anu click the Foluei. button to biowse to wheie youi ScanAPI_SBK
is installeu to select the Lib foluei unueineath it. Click 0K to valiuate youi choice,
anu Click 0K again to auu the New vaiiable Entiy in youi woikspace.

8J/J/ "*66G%R 4O 6W* $OOHG#$6G3% O,3X*#6 +3, 4KG%R "#$%&'(
Foi a BlackBeiiy taiget, go to youi }ava application pioject piopeities; select }ava
Builu Path in the tiee on the left panel of youi application piopeities uialog. 0n the
iight panel, select the Libiaiies tab anu click on the "Auu Libiaiy." button. In the
Auu Libiaiy uialog winuow select "0sei Libiaiy" anu click next. In the next scieen
select the ScanAPI libiaiy coiiesponuing to youi taigeteu uevice platfoim anu click
the Finish button.

Foi an Anuioiu taiget, go to youi }ava application pioject piopeities; select }ava
Builu Path in the tiee on the left panel of youi application piopeities uialog. Click on
the "Auu vaiiable." button, select the ScanAPI_Libs vaiiables anu click on Extenu.
Select ScanAPIAnuioiu.jai anu click 0K. Repeat this opeiation but this time select
the ScanAPIFactoiyAnuioiu.jai file. Both jai files aie iequiieu in oiuei to use
ScanAPI in youi application.

At this point youi }ava application is ieauy to use ScanAPI.
8J/J: A33HK O,3LGN*N MG6W "#$%&'( "2\

Theie aie 2 tools pioviues in the SBK anu that aie launcheu automatically uuiing
the installation of ScanAPI SBK but they will not be launcheu if you have installeu
ScanAPI SBK using the compiesseu SBK file.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 38/183
0puateWoikspace.jai tool cieates a seiies of Path vaiiables that aie useu mostly foi
compiling the SBK Sample application. The sample application is shaiing souice files
acioss BlackBeiiy anu Anuioiu by using the Path vaiiable mechanism available in
Eclipse. Since the Path vaiiable contains a complete path, anu not a ielative path,
this tool upuates these vaiiables with the path of wheie the ScanAPI SBK installeu
on the host machine. The Path vaiiables aie stoieu in the Eclispe woikspace. The
tool asks the usei foi the path of the woikspace to upuate with these new Path
vaiiables.

SetupScanAPI_SBK.jai. tool mouifies the pioject settings of the sample application
foi Anuioiu platfoim anu setup the ScanAPI SBK path in the usei libiaiy file that is
useu foi the BlackBeiiy platfoim.

If only one platfoim is taigeteu, it is entiiely safe to iun both of these tools.

/"H JR P14$%3&
ScanAPI has been compileu with visual Stuuio 2uu8 anu using the Compact
Fiamewoik 2.u anu the .NET fiamewoik S.S.

The C# veision uses a wiappei. ScanAPI has been compileu as a native (unmanageu)
BLL. This BLL is ScanAPIBLL.ull foi Winuows platfoims anu ScanAPIBLLWN.ull foi
Winuows Nobile platfoim. The manageu API is assembleu in ScanAPINanageu.ull
foi Winuows platfoims anu in ScanAPINanageuWN.ull foi the Winuows Nobile
platfoims.

Both sets of BLLs aie theiefoie iequiieu on the host uevice anu shoulu be locateu at
the same place. So foi a Winuows host, the application using ScanAPI shoulu have in
its uiiectoiy ScanAPIBLL.ull anu ScanAPINanageu.ull. Same foi a Winuows Nobile
host, the application using ScanAPI shoulu have in its uiiectoiy ScanAPIBLLWN.ull
anu ScanAPINanageuWN.ull.

In oiuei to builu youi ScanAPI application, auu the ScanAPI Nanageu iefeience in
the Refeiences foluei of youi application by biowsing to wheie ScanAPI SBK is
installeu on youi uevelopei machine, anu pointing to the iight ull. Bepenuing on
wheie the ScanAPI SBK has been installeu, the path may look like this:
C:\Piogiam Files\Socket Nobile\SocketScan 1u\ScanAPI_SBK\Winuows\lib.


/"! IST1*2%B1 J U*3=1 %&21'4+2%3&

ScanAPI is ieleaseu in a static libiaiy foim, a seiie of heauei files anu the souice files
foi ScanApiBelpei, BeviceInfo anu Bebug.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 39/183
The iecommenueu way to integiate ScanAPI in youi Xcoue pioject is to uiag anu
uiop the ScanAPI foluei locateu at the ioot of the ScanAPI SBK into youi Xcoue
pioject.

The application must auu the Exteinal accessoiy fiamewoik, anu in the info plist the
"Suppoiteu Exteinal Accessoiy Piotocol" shoulu contains the stiing
"com.socketmobile.chs".

Nost of the time, ScanApiBelpei shoulu be integiateu into one of the contiollei of
the i0S application. The heauei of this contiollei shoulu contains the following line:
#impoit "ScanApiBelpei.h"

The contiollei must ueiive fiom ScanApiBelpeiBelegate piotocol.

7 Recommendations
7.1 General
The iecommenueu appioach of managing a scannei connection to the host is to
uetect if a scannei is connecteu when neeueu in the application. It is not
iecommenueu to contiol the connection anu uisconnection of the scannei as the
scannei can be uisconnecteu oi connecteu inuepenuently of the application state.

If an application has multiple views, but only one view iequiies a scannei to be
connecteu, the best appioach foi this view is to check if a scannei is connecteu. If a
scannei is not connecteu, then the application shoulu uiiect the usei on how to
connect the scannei to the host. This can be uone by scanning a baicoue, oi simply
by tuining on a scannei that is alieauy paiieu to the host. The scannei can be left
connecteu thiough the life cycle of the application knowing that the powei
consumption foi both, the host anu the scannei, is minimal in that opeiational
moue.

If the scannei uoesn't have any activity, it will shut itself uown aftei a 2 houis
timeout. If foi some ieason, the host anu the scannei aie out of iange, the scannei
will automatically tiy to ieconnect to the host uuiing a peiiou of 4S seconus foi a
CBS 7Xi7Qi seiies oi up to Su connection attempts foi a CBS 7CiNiPi8Ci seiies.

At any time the usei can tuin off oi on the scannei. 0pon tuining the scannei back
one, it will ieconnect automatically to the last paiieu host uevice.


7.2 Android
It is not iecommenueu to attach ScanAPI oi ScanApiBelpei to the Activity class, as
this object will get uestioy anu ie-cieateu upon scieen iotation causing a connection
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 40/183
uiop of the eventual connecteu scannei. The scannei will automatically ieconnect to
the host in this case, but the usei expeiience won't be iueal.

We iecommenu attaching ScanAPI oi ScanApiBelpei to the application class as
shown in oui sample application ScanneiSettings foi the optimal usei expeiience.

It is impoitant to note that youi application must iequest the peimission to use
Bluetooth anu to wiite in the exteinal stoiage. This last peimission is iequiieu
because the ScanAPI settings aie stoieu into a file on the exteinal stoiage.
These peimissions aie iuentifieu iespectively as follow:
anuioiu.peimission.BL0ET00TB,
anuioiu.peimission.BLUETOOTH_ADMIN anu
anuioiu.peimission.WRITE_EXTERNAL_ST0RAuE.

If these peimissions aien't iequesteu, the exteinal stoiage will make ScanAPI
ietuining eiioi ESKT_TESTFAILEB (-1), anu the Bluetooth one will make ScanAPI
ietuining eiioi ESKT_0NABLE0PENBEvICE (-27) anu then
ESKT_N0TBINuT0LISTEN (-47).
7.3 iOS
0n an i0S uevice, the scannei will always stay connecteu to the host. If the
application goes to the backgiounu, the application is pauseu. The Exteinal
Accessoiy fiamewoik will then simulate a uevice uisconnection to the application,
but the Bluetooth link iemains active. When the application is biought back to the
foiegiounu, the Exteinal Accessoiy fiamewoik simulates a uevice connection. 0nly
ceitain application types aie authoiizeu to iun while in backgiounu. Foi these types
of applications, the connection to the scannei will stay alive anu iunning. The
application types aie multi-meuia (music applications playing music while moveu to
the backgiounu), v0IP applications anu location baseu applications. This iestiiction
is uictateu by i0S anu is out of the contiol of ScanAPI.

] 2*LG#* <3%%*#6G3% $%N 2GK#3%%*#6G3% O,3#*KK
With this veision S of CBS, in oiuei to have the best usei expeiience possible, the
CBS is always the initiatoi of the connection piocess. That is, the CBS will always be
the uevice to stait the connection piocess, aftei an initial setup connection has been
maue.

>"F .&%2%+; J3&&1*2%3&
The piocess of the initial connection staits by having the CBS scan a connect
baicoue. 0nce the Bluetooth paiiing piocess is completeu, the ScanAPI object
geneiates a Bevice Aiiival notification that contains the uevice infoimation.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 41/183
If the scannei is a 2B Imagei scannei, 7X7Qi seiies, the connect baicoue can be
scanneu uiiectly fiom the uevice scieen. This can be accomplisheu thiough the use
of Socket EZ Paii which is a sepaiate application ieleaseu with the SBK.

If the scannei is a 1B lasei scannei, 7NiPi, the connect baicoue must be piinteu out
on papei. Socket EZ Paii can configuie the scannei to have it connect back to the
host without the neeu to scan a connect baicoue. In this case, the 1B scannei must
be paiieu with the host fiist using the Bluetooth functionality piesent on the host.

The connect baicoue contains the Bluetooth Bevice Auuiess of the host. It must be a
Bata Natiix 2B baicoue foi the 2B Imagei scannei 7XiQi seiies, anu it ,must be a
Coue 128 1B baicoue foi the 1B 78 seiies. Refei to the scannei uocumentation foi
moie infoimation about the connect baicoue.

Some hosts iequiie having theii Bluetooth moue set to uiscoveiable in oiuei to
accept the fiist initial connection.

If the host is an i0S uevice, the connect baicoue uoesn't contain the host Bluetooth
auuiess, as i0S uoes not pioviue an API to ietiieve the Bluetooth auuiess, but
insteau contains a commanu to switch the CBS into i0S moue'. The initial
connection can be then staiteu fiom the i0S Bluetooth managei by tapping on the
uesiieu CBS listeu in the Bluetooth uiscoveieu uevices list. This will initiate the
paiiing piocess anu the CBS will connect back to the i0S uevice as soon as it is
poweieu on anu uo this until its connection infoimation is cleaieu.
>"G )AS$1VA1&2 J3&&1*2%3&
0nce the initial connection is maue between the scannei anu the host, the scannei
will automatically ieconnect to the host each time it poweis on. If the host uoesn't
have a ScanAPI application iunning at the time the scannei connects, the scannei
will tiy a ceitain numbei of times befoie aboiting the connection piocess.

ScanAPI senus a uevice aiiival notification to the application each time a scannei
connects to the host.
>"H W1*3&&1*2%3&
If the connection between the scannei anu host is lost foi any ieason, such as the
scannei moving out of iange of the host, the host suspenuing oi going to sleep, the
scannei will tiy to ieconnect to the host foi a peiiou of time (4S seconus foi a 7XQi
CBS) oi a fixeu numbei of times (Su times foi a 7CiNiPi oi 8Ci) befoie going to
iule moue.
>"! K%$*3&&1*2%3&
The uisconnection piocess usually only happens when the scannei poweis off. This
occuis when the usei piesses the scannei powei button to shut it uown, oi if the
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 42/183
scannei is connecteu foi a long peiiou of time without activity anu automatically
poweis itself off.

Theie is also a piopeity (kSktScanPiopIuBisconnectBevice) that can be set to the
scannei to make it uisconnect.

Each time a scannei uisconnects, a uevice iemoval notification fiom ScanAPI is sent
to the application containing the scannei infoimation.
>"E W3+:%&'
The scannei can connect fiom one host to anothei by simply scanning the connect
baicoue of anothei host if available. Note this effectively paiis it to the new host.

>"/ )3*X12 8Y -+%4 <1+2A41
This featuie is not available foi i0S uevices. The Scannei ieconnects automatically
as soon as the i0S uevice has successfully paiieu with the Scannei fiom its ueneial
Bluetooth settings.

The Socket EZ Paii application configuies a scannei to connect back to the host
eithei by scanning a baicoue uisplayeu on the scieen oi by using a set of piopeities
sent to the scannei. The lattei case is uesciibeu heie.

In oiuei to have ScanAPI connecting to a paiticulai scannei, the ScanAPI
communication poit configuiation must be changeu.
0sually, when a host uiscoveis a scannei, it eithei assigns a communication poit to
this paiticulai scannei (Winuows baseu platfoims), oi its fiienuly name is useu to
initiate a Bluetooth connection (BlackBeiiy anu Anuioiu platfoims). If the ScanAPI
seiial poit configuiation is mouifieu to use an outbounu poit, ScanAPI will then
connect to the iemote uevice that is assigneu to this outbounu poit.

Foi the scannei to connect back to the host, ScanAPI neeus to be ie-configuieu to
use a geneiic inbounu communications poit that the scannei will connect back on.

0nce ScanAPI has connecteu to the scannei using eithei its assigneu communication
poit oi fiienuly name, the uevice aiiival notification is ieceiveu by the application.
At that time the application shoulu senu the following piopeities to configuie the
scannei to ieconnect back to the host:
- Piopeity kSktScanPiopIuPiofileConfigBevice : to tiansmit the host Bluetooth
auuiess to the scannei anu to specify that the scannei shoulu initiate the
connection in Seiial Poit Piofile (SPP) moue.
- Piopeity kSktScanPiopIuBisconnectBevice: to uisconnect the scannei anu
make the new configuiation active. At that point the scannei will tiy to
ieconnect back to the host.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 43/183
0nce the last piopeity has been set, the configuiation of ScanAPI must be ieveiteu
back to its oiiginal configuiation so that it is waiting foi an incoming connection.

The ScanAPI piopeity kSktScanPiopIuConfiguiation "SeiialPoits" is useu in oiuei to
ieau anu mouify the ScanAPI communication poit.

N0TE: It is %36 ,*#355*%N*N to use ScanAPI as the initiatoi of the connection. It
uoesn't have ieconnection logic, anu it will neeu to get iestaiteu each time a
connection has to be maue.

9 Data Editing

Bata Euiting is a featuie built in ScanAPI to tiansfoim the uecoueu uata by uefining
a seiie of opeiations that can be tiiggeieu by specific ciiteiia. The tiiggei uefinition
anu the seiie of opeiations aie iegioupeu into a Bata Euiting Piofile.

N0TE: Bata Euiting is available on ScanAPI veision 1u.u.1u anu highei.

The concept of Bata Euiting Piofile has been intiouuceu foi coveiing the case wheie
moie than one application is using the baicoue scannei, anu the foimat of the
uecoueu uata expecteu by one application is uiffeient fiom the othei applications.
Each application can then have its own Bata Euiting Piofile. The ScanAPI SBK
pioviues an API foi the application to select its Bata Euiting piofile configuiing the
Bata Euiting to its neeus.

The Bata Euiting piofile tiiggei uefines the ciitieiia to which the uecoueu uata must
comply foi applying the Bata Euiting opeiations.
These ciiteiia aie optional anu can be ignoieu by setting u oi an empty stiing in
function of the type of paiametei.

The Bata Euiting opeiations mouify the uecoueu uata.
These opeiations aie uefineu in 2 categoiies: stiing anu inuex. The stiing categoiy
iegioups all the opeiations that tiansfoims the uecoueu uata anu ietuin a new
stiing as iesult of the tiansfoimation. The inuex categoiy aie utilities opeiations
looking foi a specific chaiacteis oi stiing of chaiacteis anu ietuining the inuex of
theii locations.

These 2 categoiies of opeiations can accept paiameteis that can be eithei a constant
value, oi the iesult of an opeiation.
This allows builuing complex Bata Euiting opeiation by chaining opeiations
togethei eithei as paiametei of each othei oi by concatenation of multiple
opeiations.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 44/183
The cuiient piofile is the piofile that ScanAPI loaus upon its initiliation oi when the
Set kSktPiopIuBataEuitingCuiientPiofile is invokeu with a valiu piofile name as
paiametei.

In the event theie is an issue in the cuiient piofile that is loaueu uuiing ScanAPI
initialization, the initialization will go thiough with success, but an eiioi event
ESKT_0NABLEINTIALIZEBATAEBITINu is sent to the application inuicating that the
cuiient Bata Euiting piofile faileu to initialize coiiectly anu theiefoie won't be
applieu.

9.1 Profile
A Data Editing Profile contains a Trigger section and an Operations section.
This gives a way to identify a set of Trigger criteria the decoded data should comply and
a set of Operations to apply to the decoded data if the trigger criteria are met.
There can be only one active profile selected at a time, often called current Profile. The
profile is identified by a name. There cant be 2 or more profile of the same name.

9.1.1 API
The list of semi colon separated profile names can be retrieved by doing a get with the
property ID set to kSktScanPropIdDataEditingProfile. For adding a new profile, just
add a new name to this list, and a placeholder for the new profile will be created. For
deleting an existing profile, just remove its name from the list.

The property kSktScanPropIdDataEditingCurrentProfile is used to retrieve or set the
current Active Profile.

Refer to the Properties paragraph for more information about these properties.
9.2 Trigger
The tiiggei contains the list of ciiteiia to which the uecoueu uata must compliant
with in oiuei to apply the Bata Euiting opeiations. If at least one conuition is not
met then the uecoueu uata is not euiteu anu stays unchangeu.
9.2.1 API
The Trigger criteria can be read or modified by using the following set of properties:
kSktScanPropIdDataEditingTriggerSymbologies,
kSktScanPropIdDataEditingTriggerMinLength,
kSktScanPropIdDataEditingTriggerMaxLength,
kSktScanPropIdDataEditingTriggerStartsBy,
kSktScanPropIdDataEditingTriggerEndsWith,
kSktScanPropIdDataEditingTriggerContains.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 45/183
All these properties require the name of the profile for which the trigger information is
read or modified.

Refer to the Properties paragraph for more information on each of these properties.
9.2.2 Symbology IDs
This tiiggei contains the list of the symbology IBs that the uecoueu uata shoulu be
coming fiom.

By example, if the list contains the IBs "Coue128" anu "Coue9S", if a "0PC" baicoue
is scanneu, the uecoueu uata aie not euiteu anu stay unmouifieu. If a "Coue128"
baicoue is scanneu anu if the uecoueu uata matches the othei Tiiggei ciiteiia, then
the Bata Euiting opeiations aie applieu to the uecoueu uata.

If no Symbology IBs aie specifieu, then the baicoue can be fiom any Symbology anu
can be euiteu as long as it matches the othei Tiiggei ciiteiia.
9.2.3 Min Length
This criteria requests the decoded data to be at least of the specified minimum size. The
Data Editing will fail to trigger if the decoded data length is smaller than the amount of
characters specified.
If no Min Length is specified or the Min Length value is set to 0, then the barcode can
have any minimum size to trigger the Data Editing.
9.2.4 Max Length
Same principle as Minimum Length, if a maximum length is specified, only the decoded
data with a size less than or equal to the maximum length will trigger the Data Editing.
If no Max Length is specified or the Max Length value is set to 0, then the barcode can
have any maximum size to trigger the Data Editing.
9.2.5 Starts By
This criteria triggers the Data Editing if and only if the decoded data starts with the
decoded data specified in this criterion.
If nothing is specified or the string is empty for this trigger parameter, the decoded data
can start by anything and be edited as long as the other trigger criteria are met.
9.2.6 Ends With
This trigger parameter specifies what is required to be present at the end of the decoded
data characters string to apply the data editing operations.
If nothing is specified for this parameter or the string is empty, the decoded data can be
ending by any characters and be edited as long as the other trigger criteria are met.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 46/183
9.2.7 Contains
This trigger parameter specifies what characters string must be present in the decoded
data in order to edit them. The characters string can be anywhere in the decoded data; at
the beginning, the ending and at the middle.
If nothing is specified or the string is empty the decoded data can contains anything and
be edited as long as the other trigger criteria are met.
9.3 Operations
The operations are defined in a single string of characters. The string should always start
by the start operation delimiter character { followed by the end operation delimiter
character }. An operation should always be delimited by the start operation delimiter
character and by the end operation delimiter.

Example: {}{DecodedData()}
This example returns the decoded data.

Any characters that are outside the operation delimiters would be concatened to the
output string.
Example: {}Prefix{DecodedData()}Suffix gives the output: Prefix123456Suffix if a
barcode containing 123456 is scanned.

There could be multiple operations after the others.
Example:{}Prefix{DecodedData()}-ABC-{DecodedData()}Suffix produces this result:
Prefix123456-ABC-123456Suffix if the barcode scanned contains 123456.

Some operations have parameters. These parameters can be a constant value or the result
of another operation as long as the type corresponds to what the parameter type is
otherwise an error is generated.
Example: {}{TruncateFromBegining({DecodedData()},3)} results to 456 if the
barcode scanned is 123456.
9.3.1 API
The property kSktScanPropIdDataEditingOperation retrieves or modifies the Data
Editing operations of a particular profile. The name of the profile is passed as parameter
of this property.

Refer to the Properties paragraph for more information about this property.
9.3.2 DecodedData
Prototype: String DecodedData()

This operation returns the decoded data as it is received from the barcode scanner.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 47/183
9.3.3 Truncate from Beginning
Prototype: String TruncateFromBeginning(String input,int nbChars)

This operation removes a number of characters from the beginning of the decoded data.
If nbChars is set to 0 the entire input characters string is retruned.
If nbChars is equal or greater than the actual length of the input string then an error
ESKT_INVALIDOPERATION is generated during the Data Editing process and the
decoded data stays un-modified. This error is not reported to the application.

9.3.4 Truncate from End
Prototype: String TruncateFromEnd(String input, int nbChars)

This operation removes a number of characters from the end of the decoded data.
If nbChars is set to 0 the entire input characters string is returned un-modified.
If nbChars is equal or greater than the actual length of the input string, then an error
ESKT_INVALIDOPERATION is generated during the Data Editing process and the
decoded data stays un-modified. This error is not reported to the application.
9.3.5 Replace
Prototype: String Replace(String input,String search,String replace)

This operation returns a string resulting of the replacement a string of characters by
another one. Only the first occurrence is replaced.

The input string is returned if the string of characters is not found.
9.3.6 Substitute
Prototype: String Substitute(String input,String strCharToReplace,String strNewValue)

This operation replaces each occurrence of a character that is present in the
strCharToReplace by the specified strNewValue.

If only one character needs to be replaced by the new value then the strCharToReplace
contains only this specific character.

Example: {}{Substitute(12345678,36,-)} returns 12-45-78.

The input string is returned un-modified if no character has been replaced.


9.3.7 Escape Character
Prototype: String EscapeCharacter(String escapeCharacterInHexa)

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 48/183
This operation returns a string that corresponds to the Escape character.

For example: the CR character, which is 0x0d, can be injected into the string by calling
this operation: {EscapeCharacter(0x0d)}.

9.3.8 InsertAfterIndex
Prototype: String InsertAfterIndex(String input,int index,String insert)

This operation inserts a string of characters after the specified index. This operation
returns the resulting string of characters. If the index value is set to -1, then this operation
inserts after the last character of the decoded data. If the index is set to -2 then this
operation doesn't insert anything and the string returned is the string in input.

If the index is bigger than the actual input string length an error
ESKT_INVALIDOPERATION is generated during the Data Editing process and the
decoded data stays un-modified. This error is not reported to the application.
9.3.9 InsertBeforeIndex
Prototype: String InsertBeforeIndex(String input,int index,String insert)

This operation inserts a string of characters before the specified index. If the index value
is set to -1, then this operation inserts before the last character of the decoded data.

If the index is set to -2, the string returned is the string in input.

If the index is bigger than the actual input string length an error
ESKT_INVALIDOPERATION is generated during the Data Editing process and the
decoded data stays un-modified. This error is not reported to the application.

9.3.10 FindFirstFromIndex
Prototype: int FindFirstFromIndex(String input,int start,String search,int offset)

This operation returns the index plus the offset of the first occurrence of a string of
characters starting the search from the specified index. If the string is not found, the index
returned is -2.

If the start index is -1 it searches from the beginning, which is the same as if the index is
set to 0. If the specified index is -2 this function returns -2 as well to indicate a string not
found.

If the start index is bigger than the actual input string length an error
ESKT_INVALIDOPERATION is generated during the Data Editing process and the
decoded data stays un-modified. This error is not reported to the application.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 49/183
9.3.11 FindLastFromIndex
Prototype: int FindLastFromIndex(String input,int end,String search,int offset)

This operation returns the index plus the offset of the last occurrence of string of
characters starting from the specified index.

If the string is not found the index returned is -2.

If the index specified is -1 the search starts from the beginning of the string, exactly like
if the index value was set to 0. If the specified index is -2, this operation returns -2
whether or not the string is found in the input string.

If the index specified is bigger than the actual input string length an error
ESKT_INVALIDOPERATION is generated during the Data Editing process and the
decoded data stays un-modified. This error is not reported to the application.

9.3.12 MakeUpperCase
Prototype: String MakeUpperCase(String input)

This operation returns the input string with all the characters converted to upper case.

9.3.13 MakeLowerCase
Prototype: String MakeLowerCase(String input)

This operation returns the input string with all the character converted to lower case.

9.3.14 ReplaceNonPrintableCharacters
Prototype: String RemoveNonPrintableCharacters(String input,String replace)

This operation returns the input string without any non-printable ASCII characters by
replacing them with the content of the replace string parameter. The replace string
parameter can be left empty which in this case will simply remove all non-printable
ASCII characters.

9.3.15 DecodedDataWithoutTrailer
Prototype: String DecodedDataWithoutTrailer()

This operation returns the decoded data without the non-printable characters located at
the end of the decoded data.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 50/183
This is useful if the scanner is programmed with a carriage return suffix, and the Data
Editing is adding a new suffix. The scanner can keep its setting while the data editing
operation is adding a new suffix.


9.3.16 TruncateAfterIndex
Prototype: String TruncateAfterIndex(String input, int index, int offset)

This operation returns the characters before the specified index plus the offset. If the
index is -1 or -2 it returns the entire input string.
If the sum of index and the offset is 0 then an empty characters string is returned.
If the sum of the index and the offset is greater than or equal to the actual input string
length then an error ESKT_INVALIDOPERATION is generated during the Data Editing
process and the decoded data stays un-modified. This error is not reported to the
application.

9.3.17 TruncateBeforeIndex
Prototype: String TruncateBeforeIndex(String input, int index, int offset)

This operation returns the characters from the specified index plus the offset up to the end
of the input string. If index is -1 or -2 the entire input string is returned.

If the sum of the index and offset is 0 then an empty characters string is returned.
If the sum of the index and offset is bigger or equal to the actual input string length then
an error ESKT_INVALIDOPERATION is generated during the Data Editing process and
the decoded data stays un-modified. This error is not reported to the application.
9.3.18 Substring
Prototype: String Substring(String input, int startIndex,int stopIndex)

This operation returns the string that is between the start index and the stop index of the
input string.

If startIndex is -1 or -2 then 0 replaces it.
If the stopIndex is -1 or -2 then it's replaced by the index of the last character in the input
string.

If the startIndex is bigger or equal to the actual input characters string length then is set to
be equal to the input characters string length.
If the stopIndex is bigger or equal to the actual input characters string length then it is set
to be equal to the input characters string length.
If the startIndex and the stopIndex are equal then an empty character string is returned.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 51/183
9.3.19 Extract
Prototype: String Extract(String input,string from, string to)

This operation returns the string that is between the first occurrence of the from string and
the last occurrence of the to string.

If the from string is not found, the entire beginning of the string is extracted up to the to
string. If the to string is not found, the string is extracted up to the end of the input string.

9.4 Import-Export
The Data Editing feature offers a way to import or export Data Editing profiles. The
Import-Export profiles format is done using a set of XML tags.

The import will merge the imported profiles into the current profiles. An error is
generated if at least one profile name is identical to a name already present in ScanAPI.

9.4.1 API
The property kSktScanPropIdDataEditingImportExport imports or exports the Data
Editing profiles.
A list of profile names must be specified to export the profiles. If a profile name doesnt
match with an actual profile, it is ignored.

Refer to the Properties paragraph for more information about this property.
9.4.2 XML Format

The import/export is using an XML format in order to define one or more Data Editing
profiles.
The first XML tag is DataEditing and it contains all the profiles. It has one attribute to
sepecify the version of ScanAPI interface. This ScanAPI interface version can be
retrieved with the property kSktScanPropIdVersion. Refer to the property paragraph for
more information about this property.

The version is important because the Data Editing profile can be save into a file for
importing profile into a different host. If this different host has a less recent version of
ScanAPI, some of the commands might not be available. The import operation checks if
the version specified in the Data Editing attribute is less than or equal to the current
ScanAPI interface version. If ScanAPI has an older version the Data Editing import will
fail with an error.

NOTE: The ScanAPI Interface version is a different version then the ScanAPI Version.
The interface version changes each time a new API or Data Editing Operation is added or
removed.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 52/183
The profile is nested in the Profile XML tag. The attribute Value of this Profile tag
contains the name of the profile.
There are 2 tags nested in the Profile tag: Trigger and Operation.

The Trigger tag also nests all the trigger parameter tags that are defined as follow:

The Symbology tag that contains an attribute Value to holds the semi-colon list of
Symbologies the decoded data can be in order to apply the Data Editing operation.

The MinLength and MaxLength tags that contain an attribute Value to hold respectively
the minimum length and maximum length a Decoded Data must be in order to trigger the
Data Editing operation.

The StartsWith and EndsWith tags that contain an attribute Value to hold respectively the
string the Decoded Data must start with and end with in order to trigger the Data Editing
operation.

The Contains tag that contains an attribute Value to hold the string the Decoded Data
must have in order to trigger the Data Editing operation.

The Profile tag nests the Operation tag that doesnt nest any other tag. It has an attribute
Value that holds the Data Editing operations.

Here is an example of 2 profiles being exported driver and prefix-suffix:

<DataEditing ScanAPIInterfaceVersion="1.0.1">
<Profile Value="driver">
<Trigger>
<Symbology Value="Pdf417"/>
<MinLength Value=""/>
<MaxLength Value=""/>
<StartsWith Value=""/>
<EndsWith Value=""/>
<Contains Value=""/>
</Trigger>
<Operation
Value="{}{ReplaceNonPrintableCharacters({Extract({DecodedData()},DCT,DBD)},
)}{Extract({DecodedData()},DCS,DCT)}{Extract({DecodedData()},DAG,DAI)}{Repla
ceNonPrintableCharacters({Extract({DecodedData()},DAI,DAJ)},
)}{ReplaceNonPrintableCharacters({Extract({DecodedData()},DAJ,DAK)},
)}{Extract({DecodedData()},DAK,DAQ)}"/>
</Profile>
<Profile Value="prefix-suffix">
<Trigger>
<Symbology Value="Code128;Code93"/>
<MinLength Value="11"/>
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 53/183
<MaxLength Value="14"/>
<StartsWith Value="12"/>
<EndsWith Value=""/>
<Contains Value="SP"/>
</Trigger>
<Operation
Value="{}PPP{TruncateFromBeginning({DecodedData()},{FindFirstFromIndex({Decod
edData()},0,*,-333)})}SSS"/>
</Profile>
</DataEditing>

10 Specific scanner configurations
Nost of the common configuiations of a scannei aie accessible thiough the
piopeities exposeu by ScanAPI.

Some specific settings can be configuieu thiough the use of the
kSktScanPiopIuBeviceSpecific piopeity.

The paiameteis of this piopeity aie specific by Scannei mouel. Foi example a
setting that woiks foi a 7Ci, won't woik foi a 7Xi.

10.1 Adaptive Scanning
The auaptive scanning piocess uses a iange finuei to pioviue feeuback on how fai
away a bai coue is when scanning, anu automatically optimizes paiameteis to
impiove uecoue peifoimance. These paiameteis incluue banuwiuth, ieceivei gain,
uigitizei settings, anu scan angle; howevei scan angle is the only noticeable
paiametei contiolleu.
When the bai coue ieaches a ceitain uistance fiom the engine (appioximately Su
inches), the engine automatically ieuuces the scan angle to naiiow (1u). (The
exception is highly ieflective bai coues, which may not cause the scan engine to
switch to the naiiow angle). Bowevei, if the scan line is not touching a bai coue, the
engine may switch to the naiiow scan angle at a much shoitei uistance. This
impioves uecoue iange on ceitain bai coues. This featuie can be uisableu anu the
usei can select naiiow, meuium, oi wiue angle only, uepenuing on application
neeus.
This featuie is suppoiteu only by the CBS 7Ni anu 7Pi (1B Lasei scanneis) RevC anu
highei.

The following table shows the content of the kSktScanPiopIuBeviceSpecific
piopeity bytes aiiay:

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 54/183
Byte inuex value Besciiption
u uxu8 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S uxF2 Fiist byte of the paiametei IB foi Auaptive Scanning
6 uxS1 Seconu byte of the paiametei IB foi Auapative Scanning
7 uxu1 uxu1: foi enabling the featuie anu uxuu foi uisabling it.



10.2 Scan Angle
The scan Angle can be changeu to be naiiowei oi wiuei. This featuie is only
available in the CBS 7Ni anu 7Pi 1B Lasei scanneis.

The following table shows the content of the kSktScanPiopIuBeviceSpecific
piopeity bytes aiiay:

Byte inuex value Besciiption
u uxu7 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S uxBF The paiametei IB foi Scan Angle
6 uxuu uxuu foi 1u angle, uxu1 foi SS anu uxu2 foi 47
10.3 Code 39 Length configuration
The uecoueu uata length can be specifieu when scanning a Coue S9 baicoue.
This featuie is also uiffeient fiom one scannei mouel to anothei.
Foi the 7Ci, 7Ni, 7Pi, 8Ci seiies:
Theie aie 4 moues possible,

0nly one uiscieet length (L1):

Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux12 The paiametei IB foi Length 1
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 55/183
6 uxuB The length value foi L1
7 ux1S The paiametei IB foi Length 2
8 uxuu The length value foi L2 must be uxuu foi 1 Biscieet


Two uiscieet lengths (L1 anu L2):
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux12 The paiametei IB foi Length 1
6 uxuB The length value foi L1 must be biggei than seconu uiscieet
length L2
7 ux1S The paiametei IB foi Length 2
8 uxu6 The length value foi L2 must be smallei than fiist uiscieet
length L1

Any uecoueu uata that is incluueu in the length iange:
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux12 The paiametei IB foi Length 1
6 uxu4 The length value foi L1 must be smallei than the seconu
length L2
7 ux1S The paiametei IB foi Length 2
8 ux1u The length value foi L2 must be gieatei than the fiist length
L1

Any length baicoue is uecoueu (may iesult in misieaus):
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux12 The paiametei IB foi Length 1
6 uxuu Nust be zeio foi any length ieau
7 ux1S The paiametei IB foi Length 2
8 uxuu Nust be zeio foi any length ieau
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 56/183


Foi the 7Xi7Qi seiies:
The 7XiQi seiies offeis thiee possible Lengths, L1, L2 anu LS. Theie is a Length
moue that tells the scannei how to use these length vaiiables. Theie aie S length
moues possible; L1 as minimum length, L1, L2 anu LS as thiee fixeu lengths anu the
last moue is L1 as minimum length anu L2 as maximum length. Fiist the Length
Noue shoulu be set, anu then all S lengths shoulu be set.

Beie is the following sequence of bytes that neeu to be sent thiough the uevice
specific piopeity to configuie the Length moue:

Byte inuex value Besciiption
u ux41 0peiation: Setup Wiite
1 ux42 uioup IB: Coue S9
2 uxSS Function IB: Length Noue
S uxuu value: uxuu L1 as minimum, uxu1 L1 L2 LS as S fixeu lengths,
uxu2 L1 as minimum length anu L2 as maximum length.


The following table shows the sequences of bytes foi configuiing the S lengths
accoiuing to the length moue:

Byte inuex value Besciiption
u ux41 0peiation: Setup Wiite
1 ux42 uioup IB: Coue S9
2 uxSu Function IB: uxSu foi Length L1, uxS1 foi Length L2 anu
uxS2 foi Length LS
S uxuC value to be set to the coiiesponuing Length (L1 oi L2 oi LS)

N0TE: when Length moue anu L1, L2 anu LS aie all set to u, it means that any length
of Coue S9 baicoue is uecoueu.
10.4 Interleaved 2 of 5 Length configuration
The uecoueu uata length can be specifieu when scanning an Inteileaveu 2 of S
baicoue.
This featuie is also uiffeient fiom one scannei mouel to anothei.
Foi the 7Ci, 7Ni, 7Pi, 8Ci seiies:
Theie aie 4 moues possible,

0nly one uiscieet length (L1):
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 57/183
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux16 The paiametei IB foi Length 1
6 uxuB The length value foi L1
7 ux17 The paiametei IB foi Length 2
8 uxuu The length value foi L2 must be uxuu foi 1 uiscieet


Two uiscieet lengths (L1 anu L2):
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux16 The paiametei IB foi Length 1
6 uxuB The length value foi Length 1, must be highei than the
Length 2 value
7 ux17 The paiametei IB foi Length 2
8 uxu6 The length value foi Length 2, must be lowei than the Length
1 value

Any uecoueu uata that is incluueu in the length iange:
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux16 The paiametei IB foi Length 1
6 uxu4 The length value foi L1 must be smallei than the seconu
length L2
7 ux17 The paiametei IB foi Length 2
8 ux1u The length value foi L2 must be gieatei than the fiist length
L1

Any uecoueu uata length (may iesult in misieaus):
Byte inuex value Besciiption
u uxu9 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux16 The paiametei IB foi Length 1
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 58/183
6 uxuu Nust be zeio foi any length
7 ux17 The paiametei IB foi Length 2
8 uxuu Nust be zeio foi any length


Foi the 7Xi7Qi seiies:
The 7XiQi seiies offeis thiee possible Lengths, L1, L2 anu LS. Theie is a Length
moue that tells the scannei how to use these length vaiiables. Theie aie S length
moues possible; L1 as minimum length, L1, L2 anu LS as thiee fixeu lengths anu the
last moue is L1 as minimum length anu L2 as maximum length. Fiist the Length
Noue shoulu be set, anu then all S lengths shoulu be set.

Beie is the following sequence of bytes that neeu to be sent thiough the uevice
specific piopeity to configuie the Length moue:

Byte inuex value Besciiption
u ux41 0peiation: Setup Wiite
1 ux44 uioup IB: Inteileaveu 2 of S
2 uxSS Function IB: Length Noue
S uxuu value: uxuu L1 as minimum, uxu1 L1 L2 LS as S fixeu lengths,
uxu2 L1 as minimum length anu L2 as maximum length.


The following table shows the sequences of bytes foi configuiing the S lengths
accoiuing to the length moue:

Byte inuex value Besciiption
u ux41 0peiation: Setup Wiite
1 ux44 uioup IB: Inteileaveu 2 of S
2 uxSu Function IB: uxSu foi Length L1, uxS1 foi Length L2 anu
uxS2 foi Length LS
S uxuC value to be set to the coiiesponuing Length (L1 oi L2 oi LS)

N0TE: when Length moue anu L1, L2 anu LS aie all set to u, it means that any length
of Inteileaveu 2 of S baicoue is uecoueu.
10.5 UPCA format
The 7Xi/Qi scanner will transmit UPCA as EAN13 by default, which means that the
barcode will include a leading country code (0 for USA). This behavior can be changed
to transmit the UPCA code as a UPCA code (no leading country code) with the
kSktScanPiopIuBeviceSpecific piopeity

The following table shows the content of the kSktScanPiopIuBeviceSpecific
piopeity bytes aiiay:

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 59/183
Byte inuex value Besciiption
u ux41 0peiation: Setup Wiite
1 ux4B uioup IB: 0PCEAN
2 uxSA Function IB: 0PCA Tiansmitteu as EAN1S
S uxuu value: uxuu uisableu, uxu1 Enableu(uefault)

0n the CBS 7Ci7Bi7Ni7Pi anu CBS 8Ci, the 0PCA foimat is contiolleu by
enabling oi uisabling the Pieamble.

The following table shows the content of the kSktScanPiopIuBeviceSpecific
piopeity bytes aiiay:

Byte inuex value Besciiption
u uxu7 Length of the commanu incluuing this byte.
1 uxC6 Set Paiametei 0pcoue
2 uxu4 Status: always uxu4 foi Bost
S uxuu Flags: always uxuu
4 uxFF Beep coue: Not useu, always uxFF
S ux22 The paiametei IB foi 0PCA Pieamble
6 uxuu uxuu foi no Pieamble (Bata only), uxu1 foi <System
Chaiactei><Bata>, anu uxu2 foi <CountiyCoue><System
Chaiactei><Bata>

11 &'( ^4%#6G3%K
The ScanAPI has 6 entiy points: 0pen, Close, uet, Set, Wait anu Release.

They all use a iefeience to eithei a ScanAPI object oi a Bevice object. These
iefeiences aie iepiesenteu uiffeiently uepenuing on the piogiamming language
useu.

Foi CC++ language this iefeience is iepiesenteu as SKTBANBLE. This hanule is
initializeu uuiing the open function anu invaliuateu aftei calling the close function.

Foi }ava anu C#, this iefeience is an inteiface. Theie aie 2 inteifaces, one foi each
object it iepiesents; ISktScanApi foi iepiesenting a ScanAPI object anu
ISktScanBevice foi iepiesenting a Bevice object. The ISktScanApi inteiface is a
supeiset of the ISktScanBevice.

0bjective C uses the same concept anu same name except it is calleu piotocol
insteau of inteiface.

A iequest to get these inteifaces instantiateu can be maue by using the
SktClassFactoiy, ie: ISktScanApi scanApi=SktClassFactoiy.cieateScanApiInstance();
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 60/183
0i in 0bjective C:
Iu<ISktScanApi> scanApi=|SktClassFactoiy cieateScanApiInstancej;

Baving an inteiface oi piotocol instance is not enough to use the object it
iepiesents. The open must be invokeu to initialize the object, anu the close will
invaliuate the object.


FF"F I51& ZA&*2%3&
The 0pen function opens eithei ScanAPI object oi a Bevice object.

"#$%&'( 3FX*#6
In oiuei to open a ScanAPI object, the uevice name shoulu be set to N0LL.

The fiist open of a ScanAPI object initializes the ScanAPI layei anu staits the piocess
of listening foi uevice connections.

0nce this open is successful the application can use this ScanAPI object iefeience to
call the wait API in its consumei logic.

If, foi some ieason, ScanAPI layei cannot open the Bluetooth seiial poits inuicateu
in its configuiation, an eiioi will be sent to the application thiough a Scan0bject
with the Nessage IB set to Event Nessage IB.

By using the special ScanAPI No Listenei u0IB of "{11B47FS6-BE62-4B28-9177-
89F1BFSBBB4B}", this API will ietuin a hanule to a ScanAPI object that won't have
a listenei thieau anu that can be useu foi euiting the ScanAPI configuiation. All
platfoims incluue a uefine foi the No Listenei u0IB as follows:
}ava: ISktScanApi.SKTSCANAPI_C0NFIu0RAT0R_u0IB
C#: ISktScanApi.SKTSCANAPI_C0NFIu0RAT0R_u0IB
C++0bjectiveC: SKTSCANAPI_C0NFIu0RAT0R_u0IB

2*LG#* 3FX*#6
In oiuei to open a uevice object, the uevice u0IB shoulu be specifieu as the uevice
name paiametei of the open API. The uevice u0IB is ietiieveu fiom the uevice
aiiival notification event.

The application will stait to ieceive uevice asynchionous events as soon as it opens
the uevice object.

11J1J1 "Q%6$V

<.<SS T
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 61/183
SKTRES0LT SktScan0pen(
const chai* pszBeviceName,
SKTBANBLE* phBevice
);


pszBeviceName
|inj the scannei uevice u0IB in a stiing foimat to open a uevice oi N0LL to
open ScanAPI object oi the No Listenei u0IB of
SKTSCANAPI_C0NFIu0RAT0R_u0IB.

phBevice
|outj pointei to ieceive the iefeience of the Bevice object oi ScanAPI object.

<7T
long ISktScanApi.0pen(
Stiing ueviceName
);

ueviceName:
|inj usually set to N0LL in oiuei to open ScanAPI object oi it coulu be set to
ISktScanApi. SKTSCANAPI_C0NFIu0RAT0R_u0IB to open ScanAPI object without a
listenei thieau. This last case is mostly useu to euit a ScanAPI configuiation without
conflicting with anothei application using ScanAPI.

long ISktScanBevice.0pen(
Stiing ueviceName
);

ueviceName
|inj the scannei uevice u0IB in a stiing to open a uevice.


U$L$T
long ISktScanApi.0pen(
Stiing ueviceName
);

ueviceName:
|inj usually set to N0LL in oiuei to open ScanAPI object oi it coulu be set to
ISktScanApi. SKTSCANAPI_C0NFIu0RAT0R_u0IB to open ScanAPI object without a
listenei thieau. This last case is mostly useu to euit a ScanAPI configuiation without
conflicting with anothei application using ScanAPI.

long ISktScanBevice.0pen(
Stiing ueviceName
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 62/183
);

ueviceName
|inj the scannei uevice u0IB as a stiing to open a paiticulai uevice. This
uevice u0IB can be ietiieveu fiom the Bevice Aiiival message event.

0bjective C:
-(SKTRES0LT) open: (NSStiing*)ueviceName;
of the piotocol ISktScanApi.

ueviceName:
|inj usually set to N0LL in oiuei to open ScanAPI object oi it coulu be set to
SKTSCANAPI_C0NFIu0RAT0R_u0IB to open ScanAPI object without a listenei
thieau. This lattei case is useu to euit a ScanAPI configuiation without conflicting
with anothei application using ScanAPI.

Same message piototype foi a uevice but this time fiom the piotocol
ISktScanBevice.
-(SKTRES0LT) open: (NNStiing*) ueviceName;

ueviceName:
|inj the scannei uevice u0IB as a stiing to open a paiticulai uevice. This
uevice u0IB can be ietiieveu fiom the Bevice Aiiival message event.

11J1J/ )*64,% L$H4*
If the function succeeus the ietuin value is ESKT_N0ERR0R.

11J1J: )*5$,DK
A close call shoulu be uone foi each object that has been pieviously openeu

If the open function is calleu moie than once, it incieases the iefeience count of the
object it opens. The same numbei of closes shoulu be maue in oiuei to completely
close the object.

11J1J- CV$5OH*
<.<SST
SKTBANBLE hScanAPI=N0LL;
SKTRES0LT iesult=SktScan0pen(N0LL,&hScanAPI);
if(SKTS0CCESS(iesult))
{
uo whatevei neeus to be uone
...
}

U$L$ 3, <7T
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 63/183
ISktScanApi _ScanApi=%4HH;
_ScanApi=SktClassFactoiy.*+$,%$-*,.B485.G%,.*$();
H3%R iesult=_scanApi.0pen(%4HH);
G+(SktScanEiiois.-=7->??@--(iesult))
{
uo whatevei neeus to be uone
}

=FX*#6GL* <T
SKTRES0LT Result=ESKT_N0ERR0R;
iu<ISktScanApi> scanApi=nil;
scanApi=|SktClassFactoiy cieateScanApiInstancej;
Result=|scanApi open:nilj;
if(SKTS0CCESS(Result)){
uo whatevei neeus to be uone
}


"** $HK3T
Sample hanuling asynchionous events of ScanAPI
11J1JP ^4%#6G3% (%+3,5$6G3%

<.<SS
Beauei SktScanAPI.h, incluue SktScanEiiois.h,
SktScanTypes.h
Impoit libiaiy ScanAPI.lib
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
<7
Refeience ScanAPINanageu.ull foi Winuows oi
ScanAPINanageuWN.ull foi Winuows
Nobile
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
U$L$
Impoit com.SocketNobile.ScanAPI.ISktScanApi
com.SocketNobile.ScanAPI.SktClassFactoiy
}ai File ScanAPIFactoiy.jai
ScanAPI.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
=FX*#6GL* <
Impoit SktScanApi.h
ScanApi.h
Fiamewoik libScanAPI.a
ExteinalAccessoiy.fiamewoik
Ninimum opeiating system i0S 4.1
11J1J8 "** &HK3
Close Function
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 64/183
FF"G J;3$1 ZA&*2%3&
This function closes ethei a ScanAPI object oi a Bevice object.
11J/J1 "Q%6$V
<.<SST
SKTRES0LT SktScanClose(
SKTBANBLE hBevice
);

hBevice
|inj Banule to the scannei uevice oi ScanAPI to close.


U$L$ 3, <7T
long ISktScanBevice.Close(); oi
long ISktScanApi.Close();

=FX*#6GL* <T
-(SKTRES0LT) close;
Fiom the piotocol ISktScanApi oi ISktScanBevice.

11J/J/ )*64,% _$H4*
If the function succeeus it ietuins ESKT_N0ERR0R.
11J/J: )*5$,DK
Any penuing opeiation attacheu to this uevice will be aboiteu.

0nce the object is closeu, any subsequent opeiation using this hanule will ietuin an
eiioi of invaliu hanule.

11J/J- CV$5OH*
See Sample hanuling asynchionous events of ScanAPI

11J/JP ^4%#6G3% (%+3,5$6G3%
<.<SS
Beauei SktScanAPI.h, incluue SktScanEiiois.h,
SktScanTypes.h
Impoit libiaiy ScanAPI.lib
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
<7
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 65/183
Refeience ScanAPINanageu.ull foi Winuows oi
ScanAPINanageuWN.ull foi Winuows
Nobile
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
U$L$
Impoit com.SocketNobile.ScanAPI.ISktScanApi
com.SocketNobile.ScanAPI.SktClassFactoiy
}ai File ScanAPIFactoiy.jai
ScanAPI.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
=FX*#6GL* <
Impoit SktScanApi.h
ScanApi.h
Fiamewoik libScanAPI.a
ExteinalAccessoiy.fiamewoik
Ninimum opeiating system i0S 4.1


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 66/183
FF"H )12 ZA&*2%3&
The Set function sets a piopeity of an object iuentifieu by its iefeience. This function
ietuins immeuiately befoie the piopeity set is actually uone. The final status shoulu
be checkeu using the Wait function.
11J:J1 "Q%6$V
<.<SST
SKTRES0LT SktScanSet(
SKTBANBLE hBevice,
TSktScan0bject * pSkt0bj
);

hBevice
|inj hanule of the uevice.

pSkt0bj
|inj pointei to an allocateu TSktScan0bject that contains the piopeity anu its
value to set.

U$L$ 3, <7T
long ISktScanBevice.SetPiopeity(
ISktScan0bject scan0bj
);
0i
Long ISktScanApi.SetPiopeity(
ISktScan0bject scan0bj
);

scan0bj
|inj iefeience to a Scan0bject that contains the piopeity anu its value to set.
The Scan0bject shoulu be cieateu using the
SktClassFactoiy.cieateScan0bject().

=FX*#6GL* <T
-(SKTRES0LT) setPiopeity: (iu<ISktScan0bject>) scan0bj;
Fiom the ISktScanApi oi ISktScanBevice piotocol.

scan0bj
|inj iefeience to a Scan0bject that contains the piopeity anu its value to set.
The Scan0bject shoulu be cieateu using the |SktClassFactoiy
cieateScan0bjectj message. 0nce this object is no longei useful it shoulu be
fieeu by using the message ieleaseScan0bject of the same class,
|SktClassFactoiy ieleaseScan0bject:scan0bjectj;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 67/183
11J:J/ )*64,% _$H4*
If the function succeeus it ietuins ESKT_N0ERR0R.

The ietuin value is ESKT_INvALIBBANBLE if the object iefeience is invaliu.

If the function is calleu befoie the completion of an outstanuing set oi get opeiation,
it ietuins ESKT_PENBINu0PERATI0NN0TC0NPLETEB.


11J:J: )*5$,DK
The Set function allows an application to set a piopeity of a scannei oi ScanAPI, oi
to senu a commanu such as tiiggeiing a scan.

The Scan0bject contains a piopeity stiuctuie that uefines the piopeity to set. This
stiuctuie has a piopeity IB fielu, a piopeity type fielu anu a value fielu. These fielus
must be set accoiuingly to the piopeity otheiwise an eiioi coue will be ietuineu.

In the success case, it will always ietuin the completion coue in the Scan0bject that
must be ietiieveu with Wait function.

The Set function will fail if it is calleu befoie the completion of a pievious Set
function oi uet function.
11J:J- CV$5OH*
<.<SST
voiu CNyAppBlg:0nTiiggeiButton()
{
SKTRES0LT Result=ESKT_N0ERR0R;

TSktScan0bject Scan0bj;
memset(&Scan0bj,u,sizeof(Scan0bj));
initialize a Scan0bject to
tiiggei the uevice
Scan0bj.Piopeity.IB=kSktScanPiopIuTiiggeiBevice;
Scan0bj.Piopeity.Type=kSktScanPiopTypeByte;
Scan0bj.Piopeity.Byte=kSktScanTiiggeiStait;

set the piopeity with the
uevice hanule
Result=SktScanSet(m_hBevice,&Scan0bj);

check the Set iesult
if(SKTS0CCESS(Result))
m_TiiggeiBtn.Enable(FALSE);
else
{
uisplay an eiioi message
BisplayEiioi(_T("0nable to tiiggei: %u"),Result);
}
}

U$L$T
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 68/183
hanulei foi the Tiiggei button
#H$KK TiiggeiButtonBanulei G5OH*5*%6K Runnable {
O,GL$6* ISktScanBevice _uevice=%4HH;
O,GL$6* ButtonFielu _button;

constiuctoi
O4FHG# TiiggeiButtonBanulei(
ISktScanBevice uevice,
ButtonFielu button)
{
_uevice=uevice;
_button=button;
}

O4FHG# L3GN iun() {

cieate a Scan0bject instance
ISktScan0bject scan0bj=
SktClassFactoiy.*+$,%$-*,./01$*%();

Initialize a Scan0bject to
Tiiggei the uevice
ISktScanPiopeity piopeity=
scan0bj.getPiopeity();

piopeity.setIB(
ISktScanPiopeity.piopIu.
2-2%-*,.3+&4567+899$+:$;8*$);

piopeity.setType(
ISktScanPiopeity.types.
2-2%-*,.3+&47<4$!<%$);

piopeity.setByte(
ISktScanPiopeity.values.tiiggei.
2-2%-*,.7+899$+-%,+%);

set the piopeity with the uevice
iefeience
H3%R iesult=_uevice.SetPiopeity(scan0bj);

check the set iesult
G+(SktScanEiiois.-=7->??@--(iesult)){
_button.setvisualState(A5->BCD-7B7@D:5-B!C@:);
}
*HK*
{
uisplay an eiioi message
BisplayEiioi("0nable to tiiggei: "+iesult);
}
}

}

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 69/183
<7T
piivate voiu buttonTiiggei_Click(object senuei, EventAigs e)
{
cieate a Scan0bject instance
ISktScan0bject scan0bj =
SktClassFactoiy.cieateScan0bject();

Initialize a Scan0bject to
Tiiggei the uevice
scan0bj.Piopeity.IB =
ISktScanPiopeity.piopIu.kSktScanPiopIuTiiggeiBevice;

scan0bj.Piopeity.Type =
ISktScanPiopeity.types.kSktScanPiopTypeByte;

scan0bj.Piopeity.Byte =
ISktScanPiopeity.values.tiiggei.kSktScanTiiggeiStait;

set the piopeity with the uevice
iefeience
long iesult = _uevice.SetPiopeity(scan0bj);
if (SktScanEiiois.SKTS0CCESS(iesult))
{
buttonTiiggei.Enableu = false;
}
else
{
uisplay an eiioi message
BisplayEiioi("0nable to tiiggei: " + iesult);
}
}

=FX*#6GL* <T

hanulei foi the Tiiggei button
-(voiu) tiiggeiAction:(iu)senuei{
SKTRES0LT Result=ESKT_N0ERR0R;
iu<ISktScan0bject>scan0bj=nil;

scan0bj=|SktClassFactoiy cieateScan0bjectj;

fill out the Scan 0bject piopeity to tiiggei the
uevice
||scan0bj PiopeityjsetIB:kSktScanPiopIuTiiggeiBevicej;
||scan0bj PiopeityjsetType:kSktScanPiopTypeBytej;
||scan0bj PiopeityjsetByte:kSktScanTiiggeiStaitj;

senu the Set piopeity message
Result=|_scanapi setPiopeity:scan0bjj;

ielease the scan0bj as it is not neeueu anymoie
|SktClassFactoiy ieleaseScan0bject:scan0bjj;

if(!SKTS0CCESS(Result)){
|self BisplayEiioiNessage:"0nable to tiiggei the uevice"j;
}
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 70/183

}




11J:JP ^4%#6G3% (%+3,5$6G3%
<.<SS
Beauei SktScanAPI.h, incluue SktScanEiiois.h,
SktScanTypes.h
Impoit libiaiy ScanAPI.lib
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
<7
Refeience ScanAPINanageu.ull foi Winuows oi
ScanAPINanageuWN.ull foi Winuows
Nobile
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
U$L$
Impoit com.SocketNobile.ScanAPI.ISktScanApi
com.SocketNobile.ScanAPI.SktClassFactoiy
}ai File ScanAPIFactoiy.jai
ScanAPI.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
=FX*#6GL* <
Impoit SktScanApi.h
ScanApi.h
Fiamewoik libScanAPI.a
ExteinalAccessoiy.fiamewoik
Ninimum opeiating system i0S 4.1




11J:J8 "** &HK3
uet Function, Wait Function
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 71/183
FF"! 012 ZA&*2%3&
The uet function ietiieves a piopeity fiom ScanAPI object oi fiom a uevice object
iuentifieu by its iefeience. This function ietuins immeuiately, anu its final iesult
shoulu be checkeu by using Wait function.
11J-J1 "Q%6$V

<.<SST
SKTRES0LT SktScanuet(
SKTBANBLE hBevice,
TSktScan0bject* pSkt0bj
);

hBevice
|inj Banule to the uevice the piopeity must be ietiieveu fiom.

pSkt0bj
|inj Pointei to a TSktScan0bject that contains the piopeity IB that neeus to
be ietiieveu.

U$L$ 3, <7T
long ISktScanBevice.uetPiopeity(
ISktScan0bject scan0bj
);

scan0bj
|inj iefeience to a Scan0bject that contains the piopeity IB that neeus to be
ietiieveu. The Scan0bject shoulu be cieateu using the
SktClassFactoiy.cieateScan0bject().

=FX*#6GL* <T
-(SKTRES0LT) getPiopeity: (iu<ISktScan0bject>) scan0bj;
Fiom the ISktScanApi oi ISktScanBevice piotocol.

scan0bj
|inj iefeience to a Scan0bject that contains the piopeity to get. The
Scan0bject shoulu be cieateu using the |SktClassFactoiy cieateScan0bjectj
message. 0nce this object is no longei useful it shoulu be fieeu using the
message ieleaseScan0bject of the same class, |SktClassFactoiy
ieleaseScan0bject:scan0bjectj;


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 72/183
11J-J/ )*64,% _$H4*
If the function succeeus it ietuins ESKT_N0ERR0R.

The ietuin value is ESKT_INvALIBBANBLE if the object iefeience is invaliu.

If the function is calleu befoie the completion of an outstanuing set oi get opeiation,
it ietuins ESKT_PENBINu0PERATI0NN0TC0NPLETEB.


11J-J: )*5$,DK
This function ietuins immeuiately. In the success case, it will always ietuin the
completion coue in the Scan0bject that must be ietiieveu with Wait function. The
Wait function ietuins the Scan0bject stiuctuie with the Piopeity fielu filleu with the
iesult of the opeiation if it has been successful. The success coue can be ietiieveu
fiom that same stiuctuie in the Result fielu.
11J-J- CV$5OH*
<.<SST

uet uevice fiienuly name
SKTRES0LT uetFiienulyName(
IN SKTBANBLE hBevice,
)
{
SKTRES0LT Result=ESKT_N0ERR0R;

TSktScan0bject Scan0bj;
memset(&Scan0bj,u,sizeof(Scan0bj);

Scan0bj.Piopeity.IB=kSktScanPiopIuFiienulyNameBevice;
Scan0bj.Piopeity.Type=kSktScanPiopTypeNone;

get the fiienuly name heie
the final iesult shoulu be fetcheu
in the uet Complete hanulei
Result=SktScanuet(hBevice,&Scan0bj);

ietuin Result;
}

U$L$ 3, <7T

get uevice fiienuly name
H3%R uetFiienulyName(ISktScanBevice uevice)
{
H3%R iesult=SktScanEiiois.@-=7DK/@HH/H;
ISktScan0bject scan0bj;
scan0bj=SktClassFactoiy.*+$,%$-*,./01$*%();

ISktScanPiopeity piopeity;
piopeity=scan0bj.getPiopeity();
piopeity.setIB(ISktScanPiopeity.piopIu.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 73/183
2-2%-*,.3+&456L+8$.6"<K,I$:$;8*$);
piopeity.setType(ISktScanPiopeity.types.
2-2%-*,.3+&47<4$K&.$);

get the fiienuly name heie
the final iesult shoulu be fetcheu
in the get complete hanulei
iesult=uevice.uetPiopeity(scan0bj);
,*64,% iesult;
}

=FX*#6GL* <T

uet the uevice fiienuly name
-(SKTRES0LT)uetFiienulyName{
SKTRES0LT Result=ESKT_N0ERR0R;
iu<ISktScan0bject>scan0bj=nil;

cieate a Scan 0bject
scan0bj=|SktClassFactoiy cieateScan0bjectj;

fill out the Scan 0bject piopeity to queiy the
uevice fiienuly name
||scan0bj PiopeityjsetIB:kSktScanPiopIuFiienulyNameBevicej;
||scan0bj PiopeityjsetType:kSktScanPiopTypeNonej;

senu the uet piopeity message
Result=|_scanapi getPiopeity:scan0bjj;

ielease the scan0bj as it is not neeueu anymoie
|SktClassFactoiy ieleaseScan0bject:scan0bjj;

ietuin Result;
}



11J-JP ^4%#6G3% (%+3,5$6G3%
<.<SS
Beauei SktScanAPI.h, incluue SktScanEiiois.h,
SktScanTypes.h
Impoit libiaiy ScanAPI.lib
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
<7
Refeience ScanAPINanageu.ull foi Winuows oi
ScanAPINanageuWN.ull foi Winuows
Nobile
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
U$L$
Impoit com.SocketNobile.ScanAPI.ISktScanApi
com.SocketNobile.ScanAPI.SktClassFactoiy
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 74/183
}ai File ScanAPIFactoiy.jai
ScanAPI.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
=FX*#6GL* <
Impoit SktScanApi.h
ScanApi.h
Fiamewoik libScanAPI.a
ExteinalAccessoiy.fiamewoik
Ninimum opeiating system i0S 4.1



11J-J8 "** &HK3

Set Function, Wait Function
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 75/183
FF"E [+%2 ZA&*2%3&
The Wait function waits foi any asynchionous events. 0nly a ScanAPI object can be
useu as iefeience foi the wait function.

Nost of the time, applications using ScanAPI, use a timei to consume the ScanAPI
asynchionous events. In this case, the wait function can be calleu with u as timeout
so that it ietuins immeuiately with timeout iesult if theie is no Scan0bject oi with
no eiioi iesult if it has ietiieveu a Scan0bject.
11JPJ1 "Q%6$V
<.<SST

SKTRES0LT SktScanWait(
SKTBANBLE hScanAPI,
TSktScan0bject** ppSkt0bj,
BW0RB uwTimeout
);

hScanAPI
|inj hanule to ScanAPI object. This hanule cannot be a hanule of a scannei
uevice. If this hanule is not a ScanAPI object, this function will ietuin an
invaliu hanule eiioi.

ppSkt0bj
|outj pointei to a TSktScan0bject pointei. TSktScan0bject is allocateu by
ScanAPI. This object must be ieleaseu when it is no longei neeueu.

uwTimeout
|inj a timeout value expiesseu in milliseconus. The timeout cannot be biggei
than 1uuuums otheiwise an eiioi will be ietuineu.

U$L$T

long ISktScanApi.WaitFoiScan0bject(
ISktScan0bject|j scan0bj,
long ulTimeout
);

scan0bj
|outj iefeience to a Scan0bject that is allocateu by ScanAPI. This object must
be ieleaseu when it is no longei neeueu.

ulTimeout
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 76/183
|inj a timeout value expiesseu in milliseconus. The timeout cannot be biggei
than 1uuuums otheiwise an eiioi will be ietuineu.

<7T
long ISktScanApi.WaitFoiScan0bject(
ISktScan0bject out scan0bj,
long ulTimeout
);

scan0bj
|outj iefeience to a Scan0bject that is allocateu by ScanAPI. This object must
be ieleaseu when it is no longei neeueu.

ulTimeout
|inj a timeout value expiesseu in milliseconus. The timeout cannot be biggei
than 1uuuums otheiwise an eiioi will be ietuineu.

=FX*#6GL* <T

-(SKTRES0LT) waitFoiScan0bject: (iu<ISktScan0bject>) scan0bj Time0ut:
(unsigneu long) ulTimeout;
0nly fiom the ISktScanApi piotocol.

scan0bj
|inj iefeience to a Scan0bject that will contain the asynchionous message
coming fiom ScanAPI. The Scan0bject shoulu be cieateu using the
|SktClassFactoiy cieateScan0bjectj message. 0nce this object is no longei
useful it shoulu fiist be ieleaseu fiom ScanAPI using the ReleaseScan0bject
API anu then it shoulu be fieeu by using the message ieleaseScan0bject of
the same class, |SktClassFactoiy ieleaseScan0bject:scan0bjectj;

To avoiu unnecessaiy calls to SktClassFactoiy, a goou appioach is at staitup
of the application to cieate one Scan0bject instance ueuicateu to be useu foi
any subsequent calls to this WaitFoiScan0bject. 0nce the application is uone
using ScanAPI, it can ielease this ueuicateu Scan0bject.

ulTimeout
|inj timeout to wait foi a Scan0bject expiesses in milliseconus. The timeout
cannot be biggei than 1uuuums otheiwise an eiioi will be ietuineu.


11JPJ/ )*64,% _$H4*
If the function succeeus it ietuins ESKT_N0ERR0R.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 77/183
If the object iefeience specifieu is not a ScanAPI object, the function ietuins
ESKT_INvALIBBANBLE.

If the timeout value is biggei than 1uuuu the function ietuins
ESKT_INvALIBTINE00T.

If the timeout occuis, the function ietuins ESKT_WAITTINE00T.

11JPJ: )*5$,DK
The Scan0bject ietiieveu using this API shoulu be ieleaseu by using the Release API.

Example
See Sample hanuling asynchionous events of ScanAPI
11JPJ- ^4%#6G3% (%+3,5$6G3%
<.<SS
Beauei SktScanAPI.h, incluue SktScanEiiois.h,
SktScanTypes.h
Impoit libiaiy ScanAPI.lib
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
<7
Refeience ScanAPINanageu.ull foi Winuows oi
ScanAPINanageuWN.ull foi Winuows
Nobile
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
U$L$
Impoit com.SocketNobile.ScanAPI.ISktScanApi
com.SocketNobile.ScanAPI.SktClassFactoiy
}ai File ScanAPIFactoiy.jai
ScanAPI.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
=FX*#6GL* <
Impoit SktScanApi.h
ScanApi.h
Fiamewoik libScanAPI.a
ExteinalAccessoiy.fiamewoik
Ninimum opeiating system i0S 4.1



11JPJP "** &HK3
Set Function
uet Function
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 78/183
Release Function.

FF"/ W1;1+$1 ZA&*2%3&
The Release function ieleases the Scan0bject the Wait function has allocateu. This
function must be calleu each time the Wait function ietuins success. 0nly a ScanAPI
object can be useu as iefeienceu when calling this Release function.
11J8J1 "Q%6$V

<.<SST

SKTRES0LT SktScanRelease(
SKTBANBLE hScanAPI,
TSktScan0bject* pSkt0bj
);

hScanAPI
|inj hanule to ScanAPI object. This hanule cannot be a hanule of a scannei
uevice. If this hanule is not a ScanAPI object, this function will ietuin an
invaliu hanule eiioi.

pSkt0bj
|inj pointei to a TSktScan0bject to ielease when it is no longei neeueu.


U$L$ 3, <7T

long ISktScanApi.ReleaseScan0bject(
ISktScan0bject scan0bj
);

scan0bj
|inj iefeience to a Scan0bject to ielease when it is no longei neeueu.

=FX*#6GL* <T

-(SKTRES0LT) ieleaseScan0bject: (iu<ISktScan0bject>) scan0bj;
0nly fiom the ISktScanApi piotocol.

scan0bj
|inj iefeience to a Scan0bject that was ieceiveu in WaitFoiScan0bject API.



Socket ScanAPI Reference
2014 Socket Mobile, Inc. 79/183
11J8J/ )*64,% _$H4*
If the function succeeus it ietuins ESKT_N0ERR0R.

If the object iefeience specifieu is not to a ScanAPI object, the function ietuins
ESKT_INvALIBBANBLE.
11J8J: )*5$,DK

11J8J- CV$5OH*
See the Sample hanuling asynchionous events of ScanAPI.
11J8JP ^4%#6G3% (%+3,5$6G3%
<.<SS
Beauei SktScanAPI.h, incluue SktScanEiiois.h,
SktScanTypes.h
Impoit libiaiy ScanAPI.lib
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
<7
Refeience ScanAPINanageu.ull foi Winuows oi
ScanAPINanageuWN.ull foi Winuows
Nobile
Ninimum opeiating systems Winuows XP, Winuows Nobile S.u
U$L$
Impoit com.SocketNobile.ScanAPI.ISktScanApi
com.SocketNobile.ScanAPI.SktClassFactoiy
}ai File ScanAPIFactoiy.jai
ScanAPI.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
=FX*#6GL* <
Impoit SktScanApi.h
ScanApi.h
Fiamewoik libScanAPI.a
ExteinalAccessoiy.fiamewoik
Ninimum opeiating system i0S 4.1



11J8J8 "** &HK3
Wait Function
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 80/183
1/ "#$%=FX*#6
The Scan0bject is the main object that is exchangeu between the application anu
ScanAPI.

This object has two main membeis: Nessage anu Piopeity.

0nly the Piopeity is ielevant when the application is senuing a piopeity to a
ScanAPI object oi a Bevice object.

The Nessage membei is ielevant only when the application is ieceiving a Scan0bject
fiom ScanAPI. The Piopeity membei is only ielevant if the Nessage IB ieceiveu is a
uet Complete oi a Set Complete.

A Nessage has a message iuentifiei fielu, a iesult fielu, a uevice fielu, anu an event
fielu.

The iuentifiei fielu inuicates the type of message ieceiveu. It can be one of the
following:

B$5* 2*K#,GO6G3%
kSktScanNsgIuBeviceAiiival Inuicates a new uevice has aiiiveu anu is ieauy to
be useu. The Bevice fielu contains the
infoimation about that uevice.
kSktScanNsgIuBeviceRemoval Inuicates a uevice is no longei available thiough
ScanAPI. The only possible opeiation is the Close
API with the uevice iefeience. The Bevice fielu
contains the infoimation about that uevice
incluuing the u0IB anu the uevice iefeience if the
uevice is still open by the application.
kSktScanNsgIuTeiminate Inuicates ScanAPI is ieauy foi shutuown. All the
uevices have been iemoveu anu closeu by the
application. It is safe foi the application to close
ScanAPI object aftei ieleasing the last Scan0bject.
kSktScanNsgSetComplete Inuicates when a Set API opeiation is completeu.
The iesult of this opeiation can be ietiieveu in
the Result fielu of the Nessage. The Scan0bject
piopeity fielu contains the piopeity infoimation.
kSktScanNsguetComplete Inuicates when a uet API opeiation is completeu.
The iesult of this opeiation can be ietiieveu in
the Result fielu of the message. The Scan0bject
piopeity fielu contains the piopeity infoimation.
kSktScanNsgEvent An asynchionous event has been ieceiveu.


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 81/183
1: &KQ%#W,3%34K 5*KK$R*K $%N *L*%6K

FH"F K1B%*1 ,44%B+;
The Wait API ietuins a Scan0bject with its NsgIB fielu set to
kSktScanNsgBeviceAiiival anu the Bevice stiuctuie fielu set to the uevice fiienuly
name, the uevice u0IB that can be useu in the 0pen API anu the uevice type.

The uevice aiiival can be ieceiveu as soon as a scannei connects to the host
computei oi if a scannei is connecteu befoie ScanAPI is initializeu.

The uevice u0IB is geneiateu each time a scannei connects to the host. If the same
scannei connects anu uisconnects seveial times, its u0IB will be uiffeient each time.
FH"G K1B%*1 W1:3B+;
The uevice iemoval is ieceiveu by the Wait API as soon as a scannei uisconnects
fiom the host computei oi uuiing the teimination piocess of ScanAPI.

The Wait API ietuins a Scan0bject with its NsgIB fielu set to
kSktScanNsgBeviceRemoval anu the Bevice stiuctuie fielu set to the uevice fiienuly
name, the uevice u0IB anu the uevice object iefeience if this uevice was successfully
openeu.

This uevice object iefeience can be uiiectly useu to close the uevice by using the
Close API.

If the uevice wasn't openeu, this iefeience is set to N0LL anu the u0IB is an empty
stiing.
FH"H D14:%&+21
The teiminate message is ieceiveu once a Set API has been invokeu with the Aboit
piopeity, anu once eveiy uevice iemoval has been iesponueu to by a close uevice.

When this message is ieceiveu it is safe to stop the consumei logic that was waiting
on the asynchionous events, to ielease this last Scan0bject anu the ScanAPI object
iefeience can be safely close using the Close API.
FH"! )12 J3:5;121
When a Set API opeiation is completeu, the Wait API ietuins with a Scan0bject that
has its NsgIB fielu set to kSktScanSetComplete. The Result fielu contains the iesult
of the Set opeiation, anu the Piopeity of the Scan0bject contains the piopeity IB foi
which the opeiation has been completeu. Theie is usually no piopeity value on a Set
Complete event. As an example, if an application is changing a uevice fiienuly name
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 82/183
using the Set API, the Set Complete will ietuin the piopeity IB of the fiienuly name,
but it won't ietuin the new fiienuly name.

FH"E 012 J3:5;121
When a uet API opeiation is completeu, the Wait API ietuins with a Scan0bject that
has its NsgIB fielu set to kSktScanuetComplete. The Result fielu contains the iesult
of the uet opeiation. If the iesult is successful the uata can be ietiieveu accoiuing to
the uata type that is set in the Type fielu of the Scan0bject Piopeity membei.
FH"/ 8B1&2$
Asynchionous events such as uecoueu uata oi low batteiy can be ieceiveu in the
Wait API. The Nsg fielu of the Scan0bject has an event membei that is uefineu by
ScanEvent.

The ScanEvent contains the event iuentifiei anu the event uata. The event uata
uefines uata that is associateu to the event ieceiveu. Event Bata has a type
uesciiptoi anu a value that uepenus on the type uesciiptoi, which coulu be None,
Byte, 0long, Aiiay, Stiing oi Becoueu Bata.

1:J8J1 '3M*, CL*%6
The Powei Event is ieceiveu when the uevice has a change iegaiuing its powei. This
allows the application 0I to uisplay cleaily the powei state of the uevice by example
when the uevice is chaiging.

The Powei Event is not activateu by uefault. The uevice notification must be
mouifieu in oiuei to tuin on this notification. This is accomplisheu by using the
piopeity kSktScanPiopIuNotificationBevice.

The powei infoimation is coueu in a uouble woiu that can be uecomposeu in 4 fielus
fiom the most significant byte to the least significant:

`Q6* : `Q6* / `Q6* 1 `Q6* 0
-ieseiveu- -ieseiveu- -ieseiveu- State

A helpei macio can be useu foi ietiieving the value.

E$#,3 %$5* 2*K#,GO6G3%
SKTP0WER_uETSTATE(poweiStatus) Retuins the least significant byte
Byte u of the uouble woiu
poweiStatus which iepiesents the
powei state.


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 83/183

<.<SST
The helpei macio can be founu in the SktScanPiopIus.h file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

CL*%6 2$6$ AQO*T kSktScanEventBataType0long.

"** $HK3T
Piopeity kSktScanPiopIuBatteiyLevelBevice
1:J8J/ 2*#3N*N 2$6$ CL*%6
The uecoueu uata event occuis each time successful uata has been uecoueu by the
scannei.

The event uata contains a uecoueu uata stiuctuie that has S fielus; a stiing fielu to
holu the uecoueu uata as ieceiveu fiom the scannei, a stiing fielu to holu the
symbology name anu a SymbologyIB fielu that inuicates the symbology IB the
uecoueu uata has been extiacteu fiom.

The uecoueu uata aiiives in the application only if the application has pieviously
openeu the uevice.

The uecoueu uata is usually in 7-bit ASCII, howevei, if the scannei is a 2B Imagei
scannei, the uata may be in a binaiy foimat, such as 0NIC0BE, Shift_}IS oi iaw
binaiy uata, uepenuing on the baicoue scanneu. The uecoueu uata will always be
N0LL teiminateu with a byte, anu the null byte uoes not count in the length.

CL*%6 2$6$ AQO*T kSktScanEventBataTypeBecoueuBata.
1:J8J: `4663%K CL*%6
The buttons event occuis each time a usei piesses a button on the uevice.

The event will be ieceiveu only if the uevice has been pieviously openeu anu the
uevice has been configuieu to senu those events.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 84/183
The Buttons Event is not activateu by uefault. The uevice notification must be
mouifieu in oiuei to tuin on this notification. This is accomplisheu by using the
piopeity kSktScanPiopIuNotificationBevice.

The same piopeity can be useu to configuie which button event the uevice will
senu. See the Piopeity kSktScanPiopIuNotificationsBevice foi moie infoimation.

The buttons coue is a byte value with a bit fielu value anu is uefineu as follows:

a 8 P - : / 1 0
Reseiveu Reseiveu Reseiveu Ring
Betacheu
Powei
button
Niuule
button
Right
button
Left
button

If the bit is set it means the button has been piesseu.

A set of macios aie uefineu to ietiieve the status.
B$5* 2*K#,GO6G3%
SKTB0TT0N_ISLEFTPRESSEB(buttons) Retuins tiue if the left button is
piesseu, false otheiwise.
SKTB0TT0N_ISRIuBTPRESSEB(buttons) Retuins tiue if the iight button is
piesseu, false otheiwise.
SKTB0TT0N_ISNIBBLEPRESSEB(buttons) Retuins tiue if the miuule button is
piesseu, false otheiwise.
SKTB0TT0N_ISP0WERPRESSEB(buttons) Retuins tiue if the powei button is
piesseu, false otheiwise.
SKTB0TT0N_ISRINuBETACBEB(buttons) Retuins tiue if the Ring unit is
uetacheu fiom the wiist unit, false
otheiwise.

Seveial buttons can be piesseu at the same time anu the button coue will ieflect that
conuition with multiple bits set to 1.

The button status can also be ietiieveu at any time by uoing a get opeiation with the
Piopeity kSktScanPiopIuButtonStatusBevice.

B=ACT
0n a scannei that has only one tiiggei button such as 7 seiies scanneis, the Niuule
button is the tiiggei button.

The powei button will geneiate one event when it is piesseu anu anothei event
when it is ieleaseu wheieas the left anu iight buttons geneiate an event only when
they aie piesseu.

<.<SST
The helpei macio can be founu in the SktScanPiopIus.h file
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 85/183

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

CL*%6 2$6$ AQO*T kSktScanEventBataTypeByte.

"** $HK3T
Piopeity kSktScanPiopIuButtonStatusBevice
1:J8J- C,,3, CL*%6
This event occuis each time theie is an eiioi, usually uuiing communication with
the uevice. The eiioi coue can be ietiieveu in the Result fielu of the message
stiuctuie.

CL*%6 2$6$ AQO*T kSktScanEventBataTypeNone oi kSktScanEventBataTypeStiing.
In the case of a Stiing uata type, the Event Stiing uata contains moie infoimation
about the eiioi. Foi example, it might contain the communications poit name that is
iepoiting an eiioi.


1:J8JP `$66*,Q b*L*H CL*%6
The Batteiy Level Event is ieceiveu when the uevice has a change iegaiuing its
batteiy level. This allows the application 0I to uisplay an aleit if the batteiy level
gets low.

The Batteiy Level Event is not activateu by uefault. The uevice notification must be
mouifieu in oiuei to tuin on this notification. This is accomplisheu by using the
piopeity kSktScanPiopIuNotificationBevice.

The uevice must be openeu in oiuei to ieceive this event.

The powei infoimation is coueu in a 0long that can be uecomposeu into thiee fielus
fiom the most significant byte to the less significant:

`Q6* : `Q6* / `Q6* 1 `Q6* 0
Batteiy Level Nax Batteiy Level Nin Batteiy Level -ieseiveu-

A set of macios is uefineu in oiuei to ietiieve these values.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 86/183

E$#,3 %$5* 2*K#,GO6G3%
SKTBATTERY_uETC0RLEvEL(batteiyLevel) Retuins the Byte 1 of the uouble
woiu batteiyLevel that contains
the cuiient batteiy level within the
Nin Level anu the Nax Level
values.
SKTBATTERY_uETNINLEvEL(batteiyLevel) Retuins the Byte 2 of the uouble
woiu batteiyLevel that contains
the level minimum.
SKTBATTERY_uETNAXLEvEL(batteiyLevel) Retuins the Byte S of the uouble
woiu batteiyLevel that contains
the level maximum.

<.<SST
The helpei macio can be founu in the SktScanPiopIus.h file

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

CL*%6 2$6$ AQO*T kSktScanEventBataType0long.

"** $HK3T
Piopeity kSktScanPiopIuBatteiyLevelBevice

1:J8J8 bGK6*%*, "6$,6*N CL*%6
When ScanAPI staits anu is initializeu, a listenei staiteu event is sent inuicating the
listenei is iunning anu listening on the communication poits.
If the ScanAPI communication poit configuiation is mouifieu, the listenei will
iestait in oiuei to ietiieve anu apply the new configuiation. Buiing this piocess, the
listenei senus a Listenei Staiteu event.
If foi some ieason the configuiation is incoiiect, oi none of the communication
poits can be useu, the listenei will then wait foi a new configuiation aftei iepoiting
this eiioi conuition.
The application 0I can then iepoit a configuiation issue that neeus to be auuiesseu.
As soon as a new configuiation is applieu, the application can iefiesh its 0I status
when it ieceives the Listenei Staiteu event.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 87/183

CL*%6 2$6$ AQO*T kSktScanEventBataTypeNone.




1- (%6,3N4#6G3% 63 ',3O*,6G*K
The Piopeity is a membei of a Scan0bject. Theie aie useu by an application to
ietiieve oi mouify a scannei piopeity by using the uet oi Set API iespectively.
Each of these opeiations is completeu only upon ieception of the uet Complete oi
Set Complete events, which also contains the iesulting piopeity.

Piopeities aie uefineu with a piopeity iuentifiei, a value type anu a value.

A piopeity contains a Context that is a usei paiametei fielu that can be associateu to
the piopeity. If an application is using this Context fielu uuiing a uet oi a Set
piopeity opeiation, the matching uet Complete oi Set Complete piopeity ieceiveu
will ietuin the same Context value.

0nce a Set oi uet opeiation is successful the iesult will always be ueliveieu in the
coiiesponuing Set Complete oi uet Complete event. The Nsg stiuctuie of the
Scan0bject ieceiveu by the application contains the iuentifiei foi a Set Complete
message oi a uet Complete message anu the Result fielu inuicates the success of the
Set oi uet opeiation.

If foi some ieason the uevice cannot iesponu to a Set oi uet piopeity opeiation, that
opeiation will eventually time out (about Ss), anu a Set oi a uet complete with a
timeout eiioi in the Nsg Result fielu will be ieceiveu by the application.

Each piopeity uefineu in the next chaptei accepts uiffeient uata type foi a uet
0peiation oi a Set 0peiation.

The uata type has to be set accoiuingly piioi peifoiming the opeiation.

Beie is the how this table is uefineu foi each piopeity:

?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
<uata type>:
uefines the
expecteu type foi a
get opeiation.
<uata type>:
uefines the type
ieceiveu in the get
complete
opeiation.
<uata type>:
uefines the
expecteu type foi a
set opeiation
<uata type>:
uefines the type
ieceiveu in the set
complete
opeiation.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 88/183
The following table summaiizes what the uata type coulu be anu what its uefinition
is.
AQO* 2*+G%G6G3%
Not applicable The cuiient piopeity uoes not suppoit this opeiation.
None The cuiient piopeity uoes not have any uata attacheu foi this
opeiation.
Byte The cuiient piopeity has a byte as uata. A byte is an 8-bit
value.
0long The cuiient piopeity has an unsigneu long as uata. An
unsigneu long is a S2 bit value.
Aiiay The cuiient piopeity has an aiiay of bytes as uata. The aiiay
has a size fielu uenoting the numbei of bytes in the aiiay.
Stiing The cuiient piopeity has a 0TF8 chaiactei stiing as uata. The
stiing has a length fielu anu is teiminateu with a N0LL
chaiactei. The length uoes not incluue the N0LL chaiactei.
veision The cuiient piopeity has a veision stiuctuie as uata.
Symbology The cuiient piopeity has a Symbology stiuctuie as uata.
0bject The cuiient piopeity holus a iefeience to an object. The
object uefinition uepenus on the Piopeity.



Theie aie two sets of piopeities; the fiist set applies to a ScanAPI object anu the
seconu set applies to a Bevice object.
An eiioi (ESKT_INvALIBBANBLE) is ietuineu if a piopeity is applieu to a wiong
object. A wiong object woulu be a ScanAPI object when the piopeity woiks only foi
a Bevice object oi vice veisa.
An eiioi (ESKT_INvALIB0PERATI0N) is ietuineu if a piopeity opeiation is not
applicable.
An eiioi (ESKT_INvALIBPARANETER) is ietuineu if a piopeity opeiation is useu
with an incoiiect piopeity uata type.
An eiioi (ESKT_ RECEIVEUNEXPECTEDCOMMAND) is returned if a property
operation is rejected by the device, due to either the command or property not being
accepted.
1P "#$%&'( 3FX*#6 O,3O*,6G*K

FE"F -4351426 X)X2)*+&-435.=,S342
This piopeity is useu to stait the shutuown piocess of ScanAPI. This piopeity must
be useu in oiuei to pioceeu to a clean shutuown. 0nce this piopeity is set, a set
complete message shoulu be ieceiveu followeu by a seiies of Bevice Removals if
theie aie any uevices connecteu to the host. If theii matching Bevice objects have
been openeu by the application, they shoulu be closeu using the Close API. 0nce all
the Bevice objects have been close oi if no uevice hanule has been pieviously
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 89/183
openeu, a Teiminate message is ieceiveu. 0pon ieception of this last message, it is
safe to stop the ScanAPI consumei logic that uses the Wait API, ielease this last
message by using Release API anu close ScanAPI by using the Close API with the
ScanAPI object iefeience.

This piopeity can only be set. A get opeiation on this piopeity will ietuin an eiioi.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable None None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

FE"G -4351426 X)X2)*+&-435.=P14$%3&
This piopeity is useu to ietiieve the veision of ScanAPI. This piopeity can only be
useu with the uet function.

The value ietuineu in a uet Complete Response is a veision stiuctuie. The
Scan0bject Piopeity has its type set to kSktScanPiopTypeveision inuicating that its
SktScanveision stiuctuie is valiu anu contains the ietiieveu infoimation. If the
iesult coue is successful, the veision can be ieau fiom that stiuctuie.

The veision stiuctuie has 9 fielus; Najoi, Niuule, Ninoi, Builu, Nonth, Bay, Yeai,
Boui anu Ninute.
Each fielu of the veision stiuctuie is a 2-byte quantity. The Builu is a 4-byte
quantity.
All the fielus aie noimally uisplayeu in Bexauecimal foimat; howevei the Builu
numbei is usually uisplayeu in a uecimal foimat.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None veision Not applicable Not applicable

CV$5OH*T
<.<SST
if(pScan0bject->Piopeity.Type==kSktScanPiopTypeveision)
{
piintf("veision: %x.%x.%x %u\nBate: %x%u2x%u2x %u2x:%u2x\n",
pScan0bject->Piopeity.veision.wNajoi,
pScan0bject->Piopeity.veision.wNiuule,
pScan0bject->Piopeity.veision.wNinoi,
pScan0bject->Piopeity.veision.uwBuilu,
pScan0bject->Piopeity.veision.wYeai,
pScan0bject->Piopeity.veision.wNonth,
pScan0bject->Piopeity.veision.wBay,
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 90/183
pScan0bject->Piopeity.veision.wBoui,
pScan0bject->Piopeity.veision.wNinute);
}

U$L$
G+(scan0bject.getPiopeity().getType()==
ISktScanPiopeity.types.2-2%-*,.3+&47<4$A$+G8&.){
0utputStiing("veision: "+
Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getNajoi())+"."+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getNiuule())+"."+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getNinoi())+" "+

scan0bject.getPiopeity().
getveision().getBuilu()+"\nBate: "+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getYeai())+""+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getNonth())+""+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getBay())+" "+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getBoui())+":"+

Integei.%&S$Q-%+8.9(scan0bject.getPiopeity().
getveision().getNinute()));
}

<7T
switch(scan0bject.Piopeity.Type)
{
case ISktScanPiopeity.types.kSktScanPiopTypeNone:
bieak;
......
case ISktScanPiopeity.types.kSktScanPiopTypeveision:
0utputStiing("veision: "+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wNajoi,16)+"."+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wNiuule,16)+"."+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wNinoi,16)+
" "+
uata._scan0bject.Piopeity.veision.uwBuilu+CARRIAuE_RET0RN+
"Bate: "+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wYeai,16)+""+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wNonth,16)+""+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wBay,16)+" "+
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wBoui,16)+":"+
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 91/183
Conveit.ToStiing(uata._scan0bject.Piopeity.veision.wNinute,16));
bieak;
uefault:
0utputStiing("value: Type unknown oi not implementeu:" +
uata._scan0bject.Piopeity.Type + CARRIAuE_RET0RN);
bieak;
}

=FX*#6GL* <T
switch(||scan0bj PiopeityjgetTypej){
case kSktScanPiopTypeNone:
bieak;
case kSktScanPiopTypeveision:
0utputStiing("veision: %x.%x.%x %u\nBate: %x%u2x%u2x %u2x:%u2x\n",
|||scan0bj Piopeityj veision jgetNajoij,
|||scan0bj Piopeityj veision jgetNiuulej,
|||scan0bj Piopeityj veision jgetNinoij,
|||scan0bj Piopeityj veision jgetBuiluj,
|||scan0bj Piopeityj veision jgetYeaij,
|||scan0bj Piopeityj veision jgetNonthj,
|||scan0bj Piopeityj veision jgetBayj,
|||scan0bj Piopeityj veision jgetBouij,
|||scan0bj Piopeityj veision jgetNinutej);
bieak;

...

uefault:
0utputStiing("value: Type unknown oi not implementeu:%u\n",||scan0bj
PiopeityjgetTypej);
bieak;


_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei
FE"H -4351426 X)X2)*+&-435.=.&214<+*1P14$%3&
This piopeity is useu to ietiieve the ScanAPI inteiface veision. If the inteiface
contiact has been mouifieu, this veision will be changeu to ieflect that mouification.
This is impoitant foi an application that uses ScanAPI as a sepaiate component such
as a BLL, wheie ScanAPI can be upuateu without the neeu of the application coue to
be iecompileu. Theiefoie the ScanAPI BLL installeu on the host might be uiffeient
fiom the ScanAPI useu uuiing the uevelopment of an application. An application can
check if the ScanAPI installeu on the system has the expecteu inteiface.

ScanAPI will always tiy to pioviue a backwaiu compatible inteiface. Theiefoie if the
inteiface veision is highei than what the application expecteu, the application
shoulu not have any pioblem using this veision of ScanAPI. Bowevei, if the inteiface
veision ietuineu is lowei, the application may not be able to iun coiiectly if it uses
some piopeity not available in the cuiient veision of the installeu ScanAPI.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 92/183
This piopeity can only be useu with the SktScanuet API. 0sing it with the SktScanSet
API will fail.

)*64,% _$H4*
The value is ietuineu in the veision stiuctuie of the Piopeity. The Piopeity type is
set to kSktScanPiopTypeveision. The veision stiuctuie has 9 fielus; Najoi, Niuule,
Ninoi, Builu, Nonth, Bay, Yeai, Boui anu Ninute.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None veision Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei



FE"! -4351426 X)X2)*+&-435.=J3&<%'A4+2%3&
This piopeity is useu to set oi get a ScanAPI piopeity.
The following piopeity values can be useu:
B$5* 2*K#,GO6G3% _$H4*K
kSktScanConfigSeiialComPoit Contains the list of
Seiial Poits sepaiateu
by semi colon ScanAPI
will listen on.
C0NS:;C0N4:.
kSktScanConfigPath Contains the
configuiation path
wheie ScanAPI saves
its configuiation on the
host.
This value can
only be ieau.
The uet
complete
ietuins the
path.
kSktScanConfigNonitoiBbgLevel Contains the actual
Bebug Level foi the
tiaces. This settings
woiks only if the
ScanAPI is compileu
with the Tiaces
capability tuineu on.
(}ava platfoims can use
this option).
This value is
expiesseu in
hexauecimal. A
value of uxu4
will tiace only
the eiioi. A
value of
uxfffff9f7 will
tuin on all the
tiaces. The
ScanAPI will
neeu to be
closeu anu
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 93/183
iestaiteu in
oiuei foi the
changes to take
effect.
kSktScanConfigNonitoiBbgFileLineLevel Auu oi iemove the file
anu line infoimation in
the tiaces. This featuie
woiks only on
Winuows Platfoims.
This value is
expiesseu in
hexauecimal.

kSktScanConfigNonitoiBbgChannel Nouify the channel to
wheie the uebug tiaces
aie uiiecteu.
This value is
expiesseu in
hexauecimal.
uxu1 foi the
noimal uebug
winuow.
uxu8 foi using
the application
output if
coiiectly setup.
A value of uxu9
will uisplay
tiaces on both,
uebug winuow
anu application
output.

The value of the seiial poit configuiation contains a list of C0N poit names wheie
each item of the list is sepaiateu by semi colon: "C0NS:;C0N4:"

In oiuei to set the piopeity, the configuiation name shoulu be specifieu in the
piopeity stiing fielu with an equal sign anu the new value foi this configuiation.

CV$5OH*

TSktScan0bject Scan0bj;
memset(&Scan0bj,u,sizeof(Scan0bj);

allocate memoiy to ieceive the new config stiing
Scan0bj.Piopeity.Stiing.pvalue=new chai|64j;
if(Scan0bj.Piopeity.Stiing.pvalue)
{
Scan0bj.Piopeity.IB=kSktScanPiopIuConfiguiation;
Scan0bj.Piopeity.Type=kSktScanPiopTypeStiing;
piintf(Scan0bj.Piopeity.Stiing.pvalue,"%s=%s",
kSktScanConfigSeiialComPoit,"C0NS:;C0N4:");
Scan0bj.Piopeity.Stiing.nLength=
stilen(Scan0bj.Piopeity.Stiing.pvalue);

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 94/183
set the configuiation heie
Result=SktScanSet(hScanAPI,&Scan0bj);

uone with this buffei
uelete|jScan0bj.Piopeity.Stiing.pvalue;
}
else
{
... hanule the eiioi
}

B=ACT
Changing the C0N poit ScanAPI is listening will cause ScanAPI to shutuown any
active connections anu iestait its listenei thieau on the newly specifieu C0N poit. If
the C0N poit uoesn't exist oi cannot be openeu an eiioi
(ESKT_0NABLE0PENBEvICE) is geneiateu anu sent to the application as an
asynchionous message. ScanAPI geneiates an eiioi (ESKT_N0TBINuT0LISTEN) if
no C0N poit can be successfully open.

<.<SST
The configuiation uefine can be founu in the SktScanPiopIus.h file.

U$L$T
The configuiation uefine can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.configuiation.

<7T
The configuiation uefine can be founu in
ScanAPI.ISktScanPiopeity.values.configuiation

=FX*#6GL* <T
The configuiation uefine can be founu in the SktScanPiopIus.h file.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

FE"E -4351426 X)X2)*+&-435.=K+2+J3&<%4:+2%3&\3=1
This piopeity is useu to ieau oi mouify the Bata confiimation featuie.

The Bata confiimation featuie contiols how uecoueu uata shoulu be acknowleugeu.
Becoueu uata can be acknowleugeu at thiee uiffeient locations; locally on the
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 95/183
scannei uevice, iemotely on the host at the ScanAPI level oi at the application level.
The auvantage of acknowleuging the uata locally on the uevice is speeu, but the
opeiatoi uoesn't know foi suie the uata has aiiiveu at the application level. The
auvantage foi the application acknowleuging the uecoueu uata is to confiim that it
coiiesponus to something expecteu by the application anu if not then the
application can acknowleuge negatively the uecoueu uata letting the opeiatoi know
the baicoue he oi she just scanneu is incoiiect. The pioblem with this moue of
acknowleugment is the small time lag that it intiouuces between each scan
opeiation.

This piopeity value is a type of byte anu its value is summaiizeu in the following
table:

B$5* 2*K#,GO6G3%
kSktScanBataConfiimationNoue0ff ScanAPI layei uoesn't tiy to altei the
actual uevice configuiation. It will be
whatevei the uevice has its local
acknowleugment set.
kSktScanBataConfiimationNoueBevice The uecoueu uata is confiimeu locally on
the uevice.
kSktScanBataConfiimationNoueScanAPI The uecoueu uata is confiimeu at
ScanAPI level if an application has
pieviously openeu the uevice hanule.
kSktScanBataConfiimationNoueApp The uecoueu uata is confiimeu at the
application level. The application shoulu
senu a Set piopeity with the iuentifiei
set to
kSktScanPiopIuBataConfiimationBevice.

<.<SST
The uata confiimation uefines can be founu in the SktScanPiopIus.h file.

U$L$T
The configuiation uefine can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.confiimationNoue.

<7T
The configuiation uefine can be founu in
ScanAPI.ISktScanPiopeity.values.confiimationNoue.

=FX*#6GL* <T
The uata confiimation uefines can be founu in the SktScanPiopIus.h file.


'$,$5*6*, 6QO*
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 96/183
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

See also 19 Bata confiimation featuie
FE"/ -4351426 X)X2)*+&-435.=K+2+J3&<%4:+2%3&,*2%3&
This piopeity ieaus oi sets the ScanAPI Bata Confiimation Action.

The Bata Confiimation Action is useu by ScanAPI only if the Bata Confiimation
Noue is set to kSktScanBataConfiimationNoueScanAPI.
In that moue, when ScanAPI ieceives uecoueu uata, it will iesponu with the Action
uefineu by this piopeity.

The Action is uefineu by a set of bits. Theie aie S actions that can be configuieu;
Rumble, Beep anu LEB. The Rumble can be set on uevice that uoesn't have a Rumble
motoi, but will have no effect.

Some helpei macios have been uefineu to help to configuie this setting.

The following table summaiizes the possible values that can be useu with the macio
SKTBATAC0NFIRNATI0N.
B$5* 2*K#,GO6G3%
kSktScanBataConfiimationRumbleNone No iumble
kSktScanBataConfiimationRumbleuoou Rumble inuicating a goou action
kSktScanBataConfiimationRumbleBau Rumble inuicating an incoiiect action

kSktScanBataConfiimationBeepNone No beep
kSktScanBataConfiimationBeepuoou Beep inuicating a goou action
kSktScanBataConfiimationBeepBau Beep inuicating an incoiiect action

kSktScanBataConfiimationLeuNone No LEB flashing
kSktScanBataConfiimationLeuuieen LEB flashing in gieen
kSktScanBataConfiimationLeuReu LEB flashing in ieu



CV$5OH*

Scan0bj.Piopeity.IB=kSktScanPiopIuBataConfiimationAction;
Scan0bj.Piopeity.Type=kSktScanPiopType0long;
Scan0bj.Piopeity.0long=SKTBATAC0NFIRNATI0N(u,
kSktScanBataConfiimationRumbleNone, kSktScanBataConfiimationBeepNone,
kSktScanBataConfiimationLeuNone);

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 97/183

<.<SST
The helpei macio anu the uefines can be founu in the SktScanPiopIus.h file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei anu the
values aie uefineu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.uataConfiimation

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei anu the values aie uefineu
in ScanAPI.ISktScanPiopeity.values.uataConfiimation.

=FX*#6GL* <T
The helpei macio anu the uefines can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0long 0long None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

See also:
19 Bata confiimation featuie

FE"7 -4351426 X)X2)*+&-435.=\3&%234\3=1
This piopeity is useu to configuie the uebug option of ScanAPI.
N0TE:
CC++ anu C#:
AWGK O,3O*,6Q M3,DK 3%HQ G+ "#$%&'( W$K F**% #35OGH*N G% 2*F4R 53N*. It will
have no effect on a ielease builu. 0nly ielease builus aie incluueu with the SBK.

The monitoi moue output tiaces in a iemote uebuggei.

Theie aie thiee monitoi moues that can be changeu anu they aie uesciibeu in the
following table:
B$5* 2*K#,GO6G3%
kSktScanNonitoiBbgLevel This monitoi moue changes the uebug
level. The Bebug level is uesciibeu
below.
kSktScanNonitoiBbgChannel This monitoi moue changes the channel
wheie the tiaces can be outputteu.
kSktScanNonitoiBbgFileLineLevel This monitoi moue changes the level
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 98/183
fiom which the tiaces will have the line
numbei anu the file name in the tiaces.
The uefault only outputs the line numbei
anu the file name if a tiace is at the
specifieu eiioi level.


2*F4R b*L*H 2*+G%G6G3%
The Bebug Level is uefineu in a S2 bit vaiiable anu is uefineu as follows:
Bit u: Level Tiace
Bit 1: Level Waining
Bit 2: Level Eiioi
Bit S: Level Always.
Bit 4 to Bit S1: Nouules.

The Nouules aie uefineu in this table:
B$5* _$H4* 2*K#,GO6G3%
BBuSKT_C0RET uxuuuuuu11 Tiaces fiom the Coie
BBuSKT_C0REW uxuuuuuu12 Waining fiom the Coie
BBuSKT_C0REE uxuuuuuu14 Eiiois fiom the Coie
BBuSKT_LISTENERT uxuuuuuu21 Tiaces fiom the listenei
BBuSKT_LISTENERW uxuuuuuu22 Wainings fiom the
listenei
BBuSKT_LISTENERE uxuuuuuu24 Eiiois fiom the listenei
BBuSKT_PR0T0C0LT uxuuuuuu41 Tiaces fiom the piotocol
BBuSKT_PR0T0C0LW uxuuuuuu42 Wainings fiom the
piotocol
BuBSKT_PR0T0C0LE uxuuuuuu44 Eiiois fiom the piotocol
BBuSKT_SERIALT uxuuuuuu81 Tiaces fiom the seiial
inteiface
BBuSKT_SERIALW uxuuuuuu82 Wainings fiom the seiial
inteiface
BBuSKT_SERIALE uxuuuuuu84 Eiiois fiom the seiial
inteiface
BBuSKT_BEvICEINTT uxuuuuu1u1 Tiaces fiom the uevice
inteiface
BuBSKT_BEvICEINTW uxuuuuu1u2 Wainings fiom the uevice
inteiface
BuBSKT_BEvICEINTE uxuuuuu1u4 Eiiois fiom the uevice
inteiface
BBuSKT_RXT uxuuuuu2u1 Tiaces fiom the ieceive
path
BBuSKT_RXW uxuuuuu2u2 Waining fiom the ieceive
path
BBuSKT_RXE uxuuuuu2u4 Eiiois fiom the ieceive
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 99/183
path
BBuSKT_TXT uxuuuuu4u1 Tiaces fiom the tiansmit
path
BBuSKT_TXW uxuuuuu4u2 Wainings fiom the
tiansmit path
BBuSKT_TXE uxuuuuu4u4 Eiiois fiom the tiansmit
path

The uet piopeity can be useu to ietiieve a paiticulai monitoi moue. The piopeity
must have its byte value set to one of the monitoi moues. The uet complete contains
the actual level in its 0long value.

The Set piopeity can be useu to change the monitoi moue level. An aiiay of S bytes
shoulu be initializeu with the fiist byte set to the paiticulai monitoi moue, anu the 4
iemaining bytes shoulu contain the new S2 bit value in big-enuian foimat.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Byte 0long Aiiay None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

15.8 Property kSktScanPropIdSoftScanStatus
This piopeity enables oi uisables the SoftScan featuie anu can make it suppoiteu oi
not suppoiteu.

The SoftScan featuie uses the uevice cameia to scan a baicoue. Some uevices might
not meet all of the iequiiements foi such an opeiation. When the SoftScan is
enableu anu the iequiiements aie all met foi scanning a baicoue using the cameia,
then a new uevice aiiival will be geneiateu with the necessaiy infoimation foi
opening a SoftScan scannei.

ScanAPI geneiates a uevice iemoval when the SoftScan scannei is uisableu by using
this same piopeity to tuin this featuie off.

By uefault the SoftScan featuie is not suppoiteu. This is uue to the fact that this
featuie iequiies a license file fiom the thiiu paity that is useu to uecoue the
baicoues.

An application can activate this featuie by uoing a set piopeity with a value set to
kSktScanSoftScanSuppoiteu. This opeiation will change the SoftScan status fiom
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 100/183
"not suppoiteu" to "uisableu". This opeiation has no effect if the cuiient status is
uiffeient fiom "not suppoiteu".

Noieovei an application can ue-activate this featuie by uoing a set piopeity with,
this time, a value set to kSktScanSoftScanNotSuppoiteu. Foi this opeiation to be
successful the cuiient status shoulu be uisableu. If the status is enableu then an
eiioi ESKT_INvALIB0PERATI0N is ietuineu.

An eiioi ESKT_N0TS0PP0RTEB is ietuineu when the cuiient SoftScan status is
"not suppoiteu" anu a set piopeity is uone with whatevei value.

The cuiient status can be ietiieveu by uoing a uet piopeity. 0ne of these thiee
possible values is ietuineu to inuicate the cuiient status of SoftScan:
kSktScanSoftScanNotSuppoiteu, kSktScanBisableSoftScan, kSktScanEnableSoftScan.

The possible values foi the byte uata fielu aie uesciibeu in the following table:
B$5* 2*K#,GO6G3%
kSktScanSoftScanNotSuppoiteu

Nake the SoftScan featuie not
available. That is the uefault. Setting
this value foi this piopeity has an
effect only if the cuiient SoftScan
status is uisableu. If the cuiient
status is enableu, the set piopeity
with this value will ietuin an eiioi
ESKT_INvALIB0PERATI0N.
kSktScanSoftScanSuppoiteu

Nake the SoftScan featuie available.
This value foi this piopeity has
effect only in the Set Piopeity anu
only if the cuiient status is not
suppoiteu.
kSktScanEnableSoftScan

Enables the SoftScan featuie when
useu in the Set opeiation, oi the
SoftScan featuie is enableu when
ietiieveu in the uet Complete
iesponse.
kSktScanBisableSoftScan

Bisables the SoftScan featuie when
useu in the Set opeiation oi the
SoftScan featuie is uisableu when
ietiieveu in the uet Complete
iesponse.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 101/183

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei




15.9 Property kSktScanPropIdDataEditingProfile
This piopeity lists, auus oi iemoves Bata Euiting piofiles.

The uet kSktScanPiopIuBataEuitingPiofile piopeity ietuins the semi-colon-
sepaiateu list of Bata Euiting piofile names.

To auu a new Bata Euiting piofile, just auu its name to the list anu uo a Set
kSktScanPiopIuBataEuitingPiofile with the new semi-colon-sepaiateu list. A Bata
Euiting piofile placeholuei is cieateu foi each new name in the list.

In a similai fashion, to iemove a Bata Euiting piofile, just iemove its name fiom the
list anu uo a Set kSktScanPiopIuBataEuitingPiofile with the new semi-colon-
sepaiateu list. The Bata Euiting piofiles that uon't have theii names in the new list
aie ueleteu.

An eiioi ESKT_BELETEC0RRENTPR0FILE is ietuineu if the list misseu the cuiient
piofile name. The cuiient piofile cannot be ueleteu. In oiuei to uelete this specific
piofile, the cuiient piofile neeus to be changeu to eithei no piofile oi to a uiffeient
piofile by uoing iespectively a Set kSktScanPiopIuBataEuitingCuiientPiofile with
an empty stiing as piofile name oi with anothei existing piofile name. 0nce the
piofile is no longei the cuiient piofile then it can be ueleteu.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei



15.10 Property kSktScanPropIdDataEditingCurrentProfile
This piopeity ietiieves oi set the cuiient Bata Euiting piofile.
The cuiient Bata Euiting piofile is the active piofile that applies the piofile
opeiations to the Becoueu Bata if all the tiiggei ciiteiia aie met.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 102/183

Boing a uet kSktScanPiopIuBataEuitingCuiientPiofile ietiieves the cuiient Bata
Euiting piofile name.

Boing a Set kSktScanPiopIuBataEuitingCuiientPiofile changes the cuiient Bata
Euiting piofile to the one iuentifieu by the name passeu as paiametei of this
piopeity. An eiioi ESKT_N0TF00NB is ietuineu is the name passeu uoesn't match
with any Bata Euiting piofile anu the cuiient piofile iemains unchangeu.

Settings an empty stiing with this piopeity just uisables the Bata Euiting piofile.

An eiioi ESKT_0NKN0WNBATAEBITINu0PERATI0N is ietuineu if the specifieu
piofile contains an unknown opeiation in its opeiations chaiactei stiing.

An eiioi ESKT_INvALIBF0RNAT is ietuineu if the specifieu piofile opeiations
chaiacteis stiing contains iuentical stait opeiation uelimitei chaiactei anu stop
opeiation uelimitei chaiactei.

If the cuiient piofile is being mouifieu, the cuiient piofile shoulu be set again in
oiuei to iefiesh the Bata Euiting with the mouifications by uoing a set
kSktScanPiopIuBataEuitingCuiientPiofile with the same name.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei



15.11 Property kSktScanPropIdDataEditingTriggerSymbologies
This piopeity ietiieves oi mouifies the list of Symbologies IB of a specifieu Bata
Euiting piofile.

The list is a semi-colon-sepaiateu symbology names uefining the symbology the
Becoueu Bata must be uecoueu fiom in oiuei to apply the Bata Euiting piofile
opeiations.

Boing a uet with this piopeity anu with the name of a specific piofile ietuins the list
of Symbologies this piofile tiiggei has.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 103/183
Boing a Set with this piopeity anu with the name of a specific piofile alteis this
piofile tiiggei symbologies list.
An eiioi ESKT_N0TF00NB is ietuineu if the piofile name uoesn't match to any
existing piofile.
An eiioi ESKT_INvALIBPARANETER is ietuineu uuiing the Set piopeity if at least
one of the symbologies specifieu in the list is unknown. In that case, the symbologies
list of this piofile iemains the same.

0nly the name is passeu in the stiing when a get is invokeu with this piopeity. The
get complete stiing paiametei contains the name of the piofile inteiiogateu, with an
equal sign anu the value ieau fiom this piofile tiiggei symbologies as shown below
with a piofile nameu piefix-suffix:
uet: piefix-suffix
uet Complete: piefix-suffix=Puf417;Coue 9S;Coue 128

The same piinciple is useu to the set piopeity anu the stiing contains the name of
the piofile, the equal sign followeu by the semi-colon-sepaiateu list of symbology
ius as shown below with a piofile nameu piefix-suffix:
Set: piefix-suffix=Puf417; Coue 9S;Coue 128

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei


15.12 Property kSktScanPropIdDataEditingTriggerMinLength
This piopeity ietiieves oi set the minimum length a uecoueu uata shoulu have to
tiiggei the Bata Euiting opeiations.

If the minimum length is set to u it means this tiiggei ciiteiium is ignoieu anu the
uecoueu uata uoes't neeu to be of a minum length to tiiggei the Bata Euiting
opeiations.

An eiioi ESKT_N0TF00NB is ietuineu if the piofile name uoesn't match to any
existing piofile.

0nly the name is passeu in the stiing when a get is invokeu with this piopeity. The
get complete stiing paiametei contains the name of the piofile inteiiogateu, with an
equal sign anu the value ieau fiom this piofile tiiggei minimum length as shown
below with a piofile nameu piefix-suffix:
uet: piefix-suffix
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 104/183
uet Complete: piefix-suffix=4

The same piinciple is useu to the set piopeity anu the stiing contains the name of
the piofile, the equal sign followeu by the minimum length as shown below with a
piofile nameu piefix-suffix:
Set: piefix-suffix=S

If theie is nothing aftei the equal sign, the minimum length is then ignoieu fiom the
tiiggei ciiteiia like if it was set to u.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei



15.13 Property kSktScanPropIdDataEditingTriggerMaxLength
This piopeity sets oi gets the maximum length a uecoueu uata must be in oiuei to
tiiggei the Bata Euiting opeiations.

The name of the piofile must be specifieu foi both set anu get calls.

The eiioi ESKT_N0TF00NB is ietuineu if the piofile name uoesn't match to any
piofile in the Bata Euiting piofiles list.

A value of u as a maximum length means that this ciiteiium is ignoieu fiom the Bata
Euiting tiiggei ciiteiia.

0nly the name is passeu in the stiing when a get is invokeu with this piopeity. The
get complete stiing paiametei contains the name of the piofile inteiiogateu, with an
equal sign anu the value ieau fiom this piofile tiiggei maximum length as shown
below with a piofile nameu piefix-suffix:
uet: piefix-suffix
uet Complete: piefix-suffix=4

The same piinciple is useu to the set piopeity anu the stiing contains the name of
the piofile, the equal sign followeu by the maximum length as shown below with a
piofile nameu piefix-suffix:
Set: piefix-suffix=S

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 105/183
If theie is nothing aftei the equal sign, the maximum length is then ignoieu fiom the
tiiggei ciiteiia like if it was set to u.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei



15.14 Property kSktScanPropIdDataEditingTriggerStartsBy
This piopeity ietiieves oi sets the stiing of chaiacteis a uecoueu uata must stait by
in oiuei to tiiggei the Bata Euiting opeiations.

The name of the piofile must be specifieu foi both set anu get piopeity.
An ESKT_N0TF00NB is ietuineu if the specifieu name uoesn't match to any name in
the piofiles list.
If an empty stiing is specifieu foi this tiiggei, the uecoueu uata uoesn't neeu to stait
by a specific chaiacteis stiing in oiuei to be euiteu by the opeiations of the Bata
Euiting piofile.

0nly the name is passeu in the stiing when a get is invokeu with this piopeity. The
get complete stiing paiametei contains the name of the piofile inteiiogateu, with an
equal sign anu the value ieau fiom this piofile tiiggei staits by ciiteiium as shown
below with a piofile nameu piefix-suffix:
uet: piefix-suffix
uet Complete: piefix-suffix=Puu

The same piinciple is useu to the set piopeity anu the stiing contains the name of
the piofile, the equal sign followeu by the staits by chaiacteis stiing as shown below
with a piofile nameu piefix-suffix:
Set: piefix-suffix=PuS



'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 106/183




15.15 Property kSktScanPropIdDataEditingTriggerEndsWith
This piopeity ietiieves oi sets the stiing of chaiacteis a uecoueu uata must enu
with in oiuei to tiiggei the Bata Euiting opeiations.

The name of the piofile must be specifieu foi both set anu get piopeity.
An ESKT_N0TF00NB is ietuineu if the specifieu name uoesn't match to any name in
the piofiles list.
If an empty stiing is specifieu foi this tiiggei, the uecoueu uata uoesn't neeu to enu
with a specific chaiacteis stiing in oiuei to be euiteu by the opeiations of the Bata
Euiting piofile.

0nly the name is passeu in the stiing when a get is invokeu with this piopeity. The
get complete stiing paiametei contains the name of the piofile inteiiogateu, with an
equal sign anu the value ieau fiom this piofile tiiggei enus with ciiteiium as shown
below with a piofile nameu piefix-suffix:
uet: piefix-suffix
uet Complete: piefix-suffix=Puu

The same piinciple is useu to the set piopeity anu the stiing contains the name of
the piofile, the equal sign followeu by the enus with chaiacteis stiing as shown
below with a piofile nameu piefix-suffix:
Set: piefix-suffix=PuS


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei




15.16 Property kSktScanPropIdDataEditingTriggerContains
This piopeity ietiieves oi sets the stiing of chaiacteis a uecoueu uata must contain
in oiuei to tiiggei the Bata Euiting opeiations.

The name of the piofile must be specifieu foi both set anu get piopeity.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 107/183
An ESKT_N0TF00NB is ietuineu if the specifieu name uoesn't match to any name in
the piofiles list.
If an empty stiing is specifieu foi this tiiggei, the uecoueu uata uoesn't neeu to
contain any specific chaiacteis stiing in oiuei to be euiteu by the opeiations of the
Bata Euiting piofile.

0nly the name is passeu in the stiing when a get is invokeu with this piopeity. The
get complete stiing paiametei contains the name of the piofile inteiiogateu, with an
equal sign anu the value ieau fiom this piofile tiiggei contains ciiteiium as shown
below with a piofile nameu piefix-suffix:
uet: piefix-suffix
uet Complete: piefix-suffix=-Z-

The same piinciple is useu to the set piopeity anu the stiing contains the name of
the piofile, the equal sign followeu by the chaiacteis stiing the uecoueu uata must
contain as shown below with a piofile nameu piefix-suffix:
Set: piefix-suffix=-Y-




'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Stiing Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei

15.17 Property kSktScanPropIdDataEditingOperation
This piopeity ietiieves oi sets the Bata Euiting opeiations of a specific piofile
iuentifieu by its name.

The Bata Euiting opeiations aie uefineu by a single stiing of opeiations that shoulu
always stait by the stait opeiation uelimitei chaiactei anu the enu opeiation
uelimitei chaiactei.

An eiioi ESKT_N0TF00NB is ietuineu if the specifieu piofile name uoesn't match to
any name of the Bata Euiting piofiles.

The syntax veiification is uone only when the piofile is active oi becomes active.
If theie is an unknown opeiation, oi a typo in the syntax of the opeiation chaiacteis
stiing uuiing the initialization of ScanAPI, an eiioi event
ESKT_0NABLEINITIALIZEBBATAEBITINu is sent to the application.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 108/183
An eiioi ESKT_0NKN0WNBATAEBITINu0PERATI0N is ietuineu in the Set
kSktScanPiopIuBataEuitingCuiientPiofile, if the specifieu piofile contains an
unknown opeiation in its opeiations chaiactei stiing.

An eiioi ESKT_INvALIBF0RNAT is ietuineu in the Set
kSktScanPiopIuBataEuitingCuiientPiofile if the specifieu piofile opeiations
chaiacteis stiing contains iuentical stait opeiation uelimitei chaiactei anu stop
opeiation uelimitei chaiactei.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei





FE"F> -4351426 X)X2)*+&-435.=)6:S3;3'%1$
This piopeity is useu to ietiieve infoimation about symbologies suppoiteu by
ScanAPI, piimaiily the name anu IB. This piopeity takes a Symbology IB value.
Symbology IB values stait fiom 1 (u is useu foi not suppoiteu) anu enu at
kSktScanSymbologyLastSymbologyIB. All suppoiteu Symbologies can be founu by
inciementing the Symbology IB until a not suppoiteu' is ietuineu, this will be
kSktScanSymbologyLastSymbologyIB. Note that even though a symbology may be
suppoiteu by ScanAPI, that uoes not mean it will be suppoiteu by a specific scannei.
The scannei must be queiieu with the kSktScanPiopIuSymbologyBevice piopeity to
ueteimine uevice symbology suppoit.

The scannei object incluues the Symbology IB anu Symbology Name. See section
16.4 foi uetails on the symbology object.

This piopeity can only be useu with the SktScanuet API. 0sing it with the SktScanSet
API will fail.

)*64,% _$H4*
The value is a Symbology object

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Symbology Symbology Not applicable Not applicable
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 109/183

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei








18 2*LG#* 3FX*#6 O,3O*,6G*K


F/"F -4351426 X)X2)*+&-435.=P14$%3&K1B%*1
This piopeity ietiieves the veision infoimation of a connecteu uevice. The veision
of the uevice can be ieau upon ieception of the uet Complete event. The piopeity
has its type set to kSktScanPiopTypeveision, anu the veision fielu of the piopeity
contains the veision infoimation of the uevice iuentifieu by its hanule. The veision is
uesciibeu by 9 fielus: wNajoi, wNiuule, wNinoi, uwBuilu, wYeai, wNonth, wBay,
wBoui anu wNinute.

These fielus aie all expiesseu in hexauecimal except foi the uwBuilu fielu that is
expiesseu in uecimal.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None veision Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"G -4351426 X)X2)*+&-435.=K1B%*1D651
This piopeity is useu to ietiieve the Bevice Type of a connecteu uevice.
A uevice type is uefineu in a S2-bit value composeu of 2 types of infoimation.
The fiist is the inteiface type that can be one of the following values:
_$H4* 2*K#,GO6G3%
kSktScanBeviceTypeInteifaceNone 0nspecifieu inteiface type foi this uevice
kSktScanBeviceTypeInteifaceSB Secuie Bigital I0 inteiface
kSktScanBeviceTypeInteifaceCF Compact Flash inteiface
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 110/183
kSktScanBeviceTypeInteifaceBluetooth Bluetooth inteiface
kSktScanBeviceTypeInteifaceSeiial Seiial cable inteiface

The seconu is the piouuct iuentifiei which can be one of the following values:
_$H4* 2*K#,GO6G3%
kSktScanBeviceTypePiouuctIuNone 0nspecifieu piouuct IB
kSktScanBeviceTypePiouuctIu7 Piouuct fiom the seiies 7 family
kSktScanBeviceTypePiouuctIu7x Piouuct fiom the seiies 7X family
kSktScanBeviceTypePiouuctIu9 Piouuct fiom the seiies 9 family
kSktScanBeviceTypePiouuctIu7xi Piouuct fiom the seiies 7XiQi
suppoiting i0S host.
kSktScanBeviceTypePiouuctIuSoftScan Bevice Cameia useu as baicoue scannei.
kSktScanBeviceTypePiouuctIu8ci Piouuct fiom the seiies 8Ci family

The following uevice types aie cuiiently suppoiteu in this SBK:
_$H4* 2*K#,GO6G3%
kSktScanBeviceTypeNone 0nspecifieu uevice
kSktScanBeviceTypeScannei7 Foi the CBS family
kSktScanBeviceTypeScannei7x Foi the CBS 7X family
kSktScanBeviceTypeScannei9 Foi the CRS family
kSktScanBeviceTypeScannei7xi Foi the CBS 7XiQi family suppoiting the
i0S host.
kSktScanBeviceTypeSoftScan Foi the uevice cameia useu as baicoue
scannei.
kSktScanBeviceTypePiouuctIu8ci Foi the CBS 8Ci

B=ACT
The CRS family is suppoiteu by ScanAPI since veision 1u.u.4.
The SoftScan featuie is suppoiteu by ScanAPI since veision 1u.u.9.

A set of pieuefineu macios can be useu in oiuei to ietiieve one of the two
infoimation types containeu in the uevice type.

SKTRETRIEvE_PR0B0CTIB(ueviceType)
This macio ietiieves the piouuct iuentification fiom the uevice type.

SKTRETRIEvE_INTERFACETYPE(ueviceType)
This macio ietiieves the inteiface type fiom the uevice type.

<.<SST
The helpei macio can be founu in the SktScanPiopIus.h file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 111/183
<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

This piopeity cannot be useu with the SktScanSet API.

',3O*,6Q AQO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0long Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"H -4351426 X)X2)*+&-435.=K1B%*1)51*%<%*
This piopeity can senu a uevice specific commanu. The commanu uepenus on the
uevice type connecteu to the host. ScanAPI acts just as a pass-thiough without
inteipieting any uata in the commanu that is sent to the uevice using this piopeity.

The commanu shoulu be set in the Aiiay membei of the piopeity, anu the iesponse
commanu is ietuineu in the Aiiay membei of the piopeity.

The commanu foimat uepenus on the uevice useu. The commanu foimat foi the
7XiQi seiies is uiffeient fiom the commanu foimat useu in the 7CiNiPi8Ci
seiies.

The commanu shoulu be piopeily foimatteu packet foi the engine without the
Checksum.


The commanu foimat foi the 7XiQi seiies is uecomposeu as uesciibeu in the
following table.
`Q6* "G[* 2*K#,GO6G3%
u 1 0peiation
1 1 uioup IB
2 1 Function IB
S vaiiable Function payloau without
Checksum

The commanu foimat foi the 7 seiies is uecomposeu as uesciibeu in the following
table.
`Q6* "G[* 2*K#,GO6G3%
u 1 Size incluuing this byte
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 112/183
1 1 0pCoue (uxC6 by
example)
2 1 Status: uxu4 foi Bost
S 1 Flags: uxuu
4 vaiiable Payloau without
checksum




',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Aiiay Aiiay Aiiay Aiiay

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"! -4351426 X)X2)*+&-435.=)6:S3;3'6K1B%*1
This piopeity is useu to ietiieve oi set the status of a paiticulai symbology. A
symbology is iuentifieu by a unique IB. A ScanAPI symbology stiuctuie is useu in
oiuei to manipulate the setting of a symbology.
This stiuctuie is TSktScanSymbology. It has the following fielus:
B$5* 2*K#,GO6G3%
IB Contains the Symbology IB (e.g.
kSktScanSymbologyCoueS9)
Flags Inuicates if the Paiam fielu is useu oi
not.
Status Inuicates the status of the symbology,
This status can be one of the following:
kSktScanSymbologyStatusBisable,
kSktScanSymbologyStatusEnable,
kSktScanSymbologyStatusNotSuppoiteu
Paiam Contains extia paiameteis about the
symbology. Not useu in this veision.
Name Contains the symbology name. The name
fielu is ignoieu when the application is
uoing a get oi set opeiation. 0nly a get
complete ietuins the name of the
symbology.

A symbology that has a kSktScanSymbologyStatusNotSuppoiteu status means the
uevice uoesn't suppoit this symbology.
The following table gives the possible Symbology Status.
B$5* 2*+G%G6G3%
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 113/183
kSktScanSymbologyStatusEnable The symbology is piesent anu activateu.
kSktScanSymbologyStatusBisable The symbology is piesent but
ueactivateu.
kSktScanSymbologyStatusNotSuppoiteu The symbology is not suppoiteu by the
uevice.

The following table gives the list of Symbology IBs.
B$5* 2*+G%G6G3%
kSktScanSymbologyNotSpecifieu The symbology IB is unknown oi not
specifieu.
kSktScanSymbologyAustialiaPost Austiial Post
kSktScanSymbologyAztec AZTEC
kSktScanSymbologyBooklanuEan B00KLANB EAN
kSktScanSymbologyBiitishPost Biitish Post
kSktScanSymbologyCanauaPost Canaua Post
kSktScanSymbologyChinese2ofS Chinese 2 of S
kSktScanSymbologyCouabai C0BABAR
kSktScanSymbologyCouablockA C0BABL0CK A
kSktScanSymbologyCouablockF C0BABL0CK F
kSktScanSymbologyCoue11 Coue 11
kSktScanSymbologyCoueS9 Coue S9
kSktScanSymbologyCoueS9Extenueu Coue S9 Full ASCII
kSktScanSymbologyCoueS9Tiioptic Coue S9 Tiioptic
kSktScanSymbologyCoue9S Coue 9S
kSktScanSymbologyCoue128 Coue 128
kSktScanSymbologyBataNatiix Bata Natiix
kSktScanSymbologyButchPost Butch Post
kSktScanSymbologyEan8 EAN 8
kSktScanSymbologyEan1S EAN 1S
kSktScanSymbologyEan128 EAN 128
kSktScanSymbologyEan128Iiiegulai EAN 128 Iiiegulai
kSktScanSymbologyEan0ccCompositeAB EAN 0CC Composite AB
kSktScanSymbologyEan0ccCompositeC EAN 0CC Composite C
kSktScanSymbologyus1Batabai uS1 BATABAR
kSktScanSymbologyus1BatabaiLimiteu uSI BATABAR Limiteu
kSktScanSymbologyus1BatabaiExpanueu uS1 BATABAR Expanueu
kSktScanSymbologyInteileaveu2ofS Inteileaveu 2 of S
kSktScanSymbologyIsbt128 ISBT 128
kSktScanSymbology}apanPost }apan Post
kSktScanSymbologyNatiix2ofS Natiix 2 of S
kSktScanSymbologyNaxicoue Naxicoue
kSktScanSymbologyNsi NSI
kSktScanSymbologyPuf417 PBF 417
kSktScanSymbologyPuf417Nicio PBF 417 Nicio
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 114/183
kSktScanSymbologyPlanet Planet 0S Post
kSktScanSymbologyPlessey PLESSEY
kSktScanSymbologyPostnet P0STNET 0S Post
kSktScanSymbologyQRCoue QR Coue
kSktScanSymbologyStanuaiu2ofS Stanuaiu 2 of S
kSktScanSymbologyTelepen Telepen
kSktScanSymbologyTlcS9 TLC S9
kSktScanSymbology0pcA 0PC A
kSktScanSymbology0pcEu 0PC Eu
kSktScanSymbology0pcE1 0PC E1
kSktScanSymbology0spsIntelligentNail 0SPS Intelligent Nail
kSktScanSymbologyBiiectPaitNaiking Biiect Pait Naiking optimization
kSktScanSymbologyBanXin Ban Xin
kSktScanSymbologyLastSymbologyIB Last symbology IB, this is not an actual
symbology.

The enumeiation of the available symbologies of a uevice can be uone by uoing get
opeiations with the symbology IB inciementeu one by one fiom
kSktScanSymbologyNotSpecifieu+1 to kSktScanSymbologyLastSymbolIB-1. Foi
moie infoimation please see section 18.

<.<SST
The Symbology IB anu Symbology status uefines can be founu in SktScanTypes.h
file.

U$L$T
The Symbology IB anu Symbology status uefines can be founu in:
com.SocketNobile.ScanAPI.ISktScanSymbology.iu anu
com.SocketNobile.ScanAPI.ISktScanSymbology.status

<7T
The Symbology IB anu Symbology status uefines can be founu in:
ScanAPI.ISktScanSymbology.iu anu ScanAPI.ISktScanSymbology.status.

=FX*#6GL* <T
The Symbology IB anu Symbology status uefines can be founu in SktScanTypes.h
file.

',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Symbology Symbology Symbology None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 115/183
See also:
1S.6.2 Becoueu Bata Event
F/"E -4351426 X)X2)*+&-435.=D4%''14K1B%*1
This piopeity allows the application to stait oi stop a tiiggei opeiation of a uevice
iemotely oi to activateueactivate the uevice tiiggei button. This piopeity can only
be useu in a Set opeiation. Its Byte value can have one of the following values:
B$5* 2*K#,GO6G3%
kSktScanTiiggeiStait Stait a scan
kSktScanTiiggeiStop Stop a scan
kSktScanTiiggeiEnable Enable the tiiggei button
kSktScanTiiggeiBisable Bisable the tiiggei button

N0TE: Enabling oi Bisabling the tiiggei will be not effective on CBS 7C
veision:S.4.u.1869. It will ietuin an eiioi (ESKT_RECEIvE0NEXPECTEBC0NNANB)
foi both of these commanus. This veision of the CBS 7C is a limiteu ielease anu this
issue has been fixeu in the next ievision of the scannei.

In the case of tiiggeiing a SoftScan ieau, the SoftScannei must have its oveilay view
set piioi to tiiggei a scan. An eiioi ESKT_0vERLAYvIEWN0TSET is geneiateu if this
hasn't been uone yet anu a set kSktScanPiopIuTiiggeiBevice is applieu. This is a
iequiiement in oiuei foi SoftScan to uisplay its viewfinuei. Please iefei to the
kSktScanPiopIu0veilayviewBevice foi moie uetails on this piopeity.

<.<SST
The Tiiggei uefines can be founu in SktScanPiopIus.h file.

U$L$T
The Tiiggei uefines can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.tiiggei

<7T
The Tiiggei uefines can be founu in ScanAPI.ISktScanPiopeity.values.tiiggei.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.


',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 116/183
See also:
4.7 Example of senuing a commanu
F/"/ -4351426 X)X2)*+&-435.=,55;6J3&<%'K1B%*1
This piopeity applies the uevice configuiation stoieu on the host to the uevice.
This piopeity can only be set anu uoesn't have any paiameteis.

',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable None None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"7 -4351426 X)X2)*+&-435.=-41+:S;1K1B%*1
This piopeity can be useu to set oi get the uevice pieamble. When a pieamble is set,
it will be auueu in fiont of the uecoueu uata. The pieamble is uefineu as a stiing with
a length that can contain any value foi each chaiactei fiom u (uxuu) to 2SS (uxff).

B=ACT AW* a K*,G*K :J1 K#$%%*,K N3%c6 K4OO3,6 $ 6,4* O,*$5FH*J AW* O,*$5FH*
GK $#64$HHQ K63,*N 3% 6W* N*LG#* $K O$,6 $K 6W* +,G*%NHQ %$5* $%N O3K6$5FH*J
AW* 636$H $534%6 3+ #W$,$#6*,K +3, 6W* +,G*%NHQ %$5*I O,*$5FH* $%N O3K6$5FH*
#$%%36 F* FGRR*, 6W$% /] #W$,$#6*,KJ (+ $ O,*$5FH* GK 633 H3%RI $% *,,3,
C"\Ad(B_&b(2'&)&ECAC) M34HN F* R*%*,$6*N G% 6W* ,*64,% 3+ 6W*
"D6"#$%"*6 &'(J (+ 6W* N*LG#* GK 4K*N MG6W346 "#$%&'(I 6W* O,*$5FH* M3%c6
$OO*$, G% +,3%6 3+ 6W* N*#3N*N N$6$J
AW* a K*,G*K :J/ 3, WGRW*, K#$%%*,K K4OO3,6 $ HG5G6*N O,*$5FH*J AW* O,*$5FH*
#$% 3%HQ F* 3%* #W$,$#6*, H3%RJ (6 #$% F* 4K*N MG6W346 "#$%&'( 3%#* G6 GK K*64OJ

AW* a K*,G*K L*,KG3% #$% F* N*6*,5G%*N FQ 6W* _*,KG3% O,3O*,6Q E$X3, $%N
EGNNH* L$H4*KJ

AW*K* ,*5$,DK N3 %36 $OOHQ +3, 6W* aeG.fG K*,G*KJ

',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 117/183
F/"> -4351426 X)X2)*+&-435.=-3$2+:S;1K1B%*1
This piopeity can be useu to set oi get the uevice postamble. When a postamble is
set, it will be auueu at the tail of the uecoueu uata. The postamble is uefineu as a
stiing with a length that can contains any value foi each chaiactei fiom u (uxuu) to
2SS (uxff).

B=ACT AW* a K*,G*K L:J1 N3%c6 K4OO3,6 $ 6,4* O3K6$5FH*J AW* O3K6$5FH* GK
$#64$HHQ K63,*N 3% 6W* N*LG#* $K O$,6 $K 6W* +,G*%NHQ %$5* $%N O,*$5FH*J AW*
636$H $534%6 3+ #W$,$#6*,K +3, 6W* +,G*%NHQ %$5*I O,*$5FH* $%N O3K6$5FH*
#$%%36 F* FGRR*, 6W$% /] #W$,$#6*,KJ (+ $ O3K6$5FH* GK 633 H3%RI $% *,,3,
C"\Ad(B_&b(2'&)&ECAC) M34HN F* R*%*,$6*N G% 6W* ,*64,% 3+ 6W*
"D6"#$%"*6 &'(J (+ 6W* N*LG#* GK 4K*N MG6W346 "#$%&'(I 6W* O3K6$5FH* M3%c6
$OO*$, $6 6W* 6$GH 3+ 6W* N*#3N*N N$6$J
AW* a K*,G*K L:J/ 3, WGRW*, K4OO3,6 $ HG5G6*N O3K6$5FH*J AW* O3K6$5FH* #$%
3%HQ F* / #W$,$#6*,K H3%RJ (6 #$% F* 4K*N MG6W346 "#$%&'( 3%#* G6 GK K*64OJ

AW*K* ,*5$,DK N3%c6 $OOHQ +3, 6W* aeG.fG K*,G*KJ



',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"C -4351426 X)X2)*+&-435.=J+5+S%;%2%1$K1B%*1
This piopeity can be useu to get the uevice capabilities.
The capabilities of a uevice have been uiviueu in 2 gioups: ueneial anu Local
Functions.
The ueneial gioup contains the infoimation about the uevice to ueteimine if it has a
Local Function uioup capability.

The Local Function uioup iegioups the featuies that aie implementeu locally on the
uevice, such as Fiienuly Name, Sounu, Leu flash, Rumble, etc.

The featuies that belong to the ueneial uioup aie featuies implementeu in any type
of uevice, such as Bevice Type, Symbology settings, Tiiggei etc. Nost of the time,
these featuies aie implementeu in the scannei engine.

The uet Request has a one-byte paiametei to inteiiogate the one of the capabilities
gioup.
The following table uesciibes the capabilities of each gioup.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 118/183

If the uet Piopeity byte value is set to kSktScanCapabilityueneial, the ietuin value
of the uet Complete Piopeity is a 0long uesciibing the geneial capability. In the
cuiient veision of ScanAPI only Bit u is set to 1 if the uevice suppoits Local
Functions.

:
1
:
0
/
;
/
]
/
a
/
8
/
P
/
-
/
:
/
/
/
1
/
0
1
;
1
]
1
a
1
8
1
P
1
-
1
:
1
/
1
1
1
0
; ] a 8 P - : / 1 0
u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u X
The X is set to 1 when the uevice suppoits Local Functions.

If the uet Piopeity byte value is set to kSktScanCapabilityLocalFunctions, the ietuin
value of the uet Complete Piopeity is an unsigneu long (0long) uesciibing the Local
Functions capability.
In the cuiient veision of ScanAPI, the Bit u is set to 1 if the uevice suppoits Rumble
moue anu the Bit 1 is set to 1 if the Change IB featuie is piesent.

:
1
:
0
/
;
/
]
/
a
/
8
/
P
/
-
/
:
/
/
/
1
/
0
1
;
1
]
1
a
1
8
1
P
1
-
1
:
1
/
1
1
1
0
; ] a 8 P - : / 1 0
u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u Y X
Bit u is set to 1 when the uevice suppoits Rumble Noue.
Bit 1 is set to 1 when the uevice suppoits the Change IB featuie.
These aie the constants useu foi capability uefinition:
kSktScanCapabilityLocalFunctionRumble anu
kSktScanCapabilityLocalFunctionChangeIB.

CV$5OH*T

switch (scan0bj.Piopeity.IB)
{
case ISktScanPiopeity.piopIu.kSktScanPiopIuFiienulyNameBevice:
......
bieak;
case ISktScanPiopeity.piopIu.kSktScanPiopIuCapabilitiesBevice:
if (SktScanEiiois.SKTS0CCESS(iesult))
{ selecteuScannei.0iiginalPiopeities.Configuiation.BoesRumble =
((scan0bj.Piopeity.0long&
ISktScanPiopeity.values.capabilityLocalFunctions.kSktScanCapabilityLocalFunctionRumble)==
ISktScanPiopeity.values.capabilityLocalFunctions.kSktScanCapabilityLocalFunctionRumble);
}
else
{
unable to get the capabilities even aftei multiple
ietiies by ScanAPI Belpei
StopRetiievingPiopeitiesAnuBisplayEiioi("Faileu to ietiieve the Capabilities: " +
iesult);
}
bieak;
case ISktScanPiopeity.piopIu.kSktScanPiopIuPostambleBevice:
......
bieak;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 119/183
}


<.<SST
The constants uefinitions foi the capabilities can be founu in SktScanPiopIus.h file.

U$L$T
The constants uefinition foi the capabilities can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.capabilityuioup
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.capabilityueneial
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.capabilityLocalFunctions

<7T
The constants uefinition foi the capabilities can be founu in
ScanAPI.ISktScanPiopeity.values.capabilityuioup
ScanAPI.ISktScanPiopeity.values.capabilityueneial
ScanAPI.ISktScanPiopeity.values.capabilityLocalFunctions

=FX*#6GL* <T
The constants uefinitions foi the capabilities can be founu in SktScanPiopIus.h file.


',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Byte 0long Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"FL -4351426 X)X2)*+&-435.=J@+&'1.=K1B%*1
This piopeity ietuins a Change IB of the uevice symbology configuiation anu the
uevice pieamble anu postamble. This Change IB will ieflect any configuiation
change in the scannei engine that coulu have been maue outsiue ScanAPI by
scanning a scannei engine configuiation baicoue.

This featuie is useful to figuie out if the uevice has a uiffeient symbology
configuiation oi pieamblepostamble than the host has stoieu foi this uevice.

The enumeiation of all the suppoiteu symbologies can be a lengthy opeiation that
can be gieatly impioveu by implementing a symbology cache mechanism.

The fiist time a uevice is connecteu to the host, its symbology status gets
enumeiateu anu stoieu into a cache. The change IB is also iequesteu.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 120/183
If the uevice uisconnects anu then ieconnects at a latei time to this host, the change
IB is iequesteu anu compaieu with the ChangeIB stoieu in the host cache.
If the change IB is the same then the symbology can be uisplayeu out of the cache
without iequesting it fiom the uevice.
If the ChangeIB is uiffeient, this means the symbology on the uevice has been
alteieu, anu it will iequiie a new enumeiation of the symbology fiom the uevice.

The change IB is a 0long value that is a checksum of all the scannei engine settings
(incluuing symbology activation anu pieamblepostamble).
0thei scannei piopeities aien't covei by this Change IB such as beepsLEBRumble
configuiation, fiienuly name, uata stoie, anu confiimation settings.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0long Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei




F/"FF -4351426 X)X2)*+&-435.=Z4%1&=;6M+:1K1B%*1
This piopeity is useu to ieau oi mouify the fiienuly name of a uevice. The fiienuly
name is caiiieu as a stiing in the piopeity.
The fiienuly name of a uevice is what appeais uuiing a Bluetooth uevice uiscoveiy
piocess. The main puipose of changing the fiienuly name of a uevice is to have an
easy way to iuentify a paiticulai uevice.

The changes aie active immeuiately upon success of the Set Complete opeiation.

The fiienuly name size can be as long as S2 0TF8 chaiacteis incluuing the null
teiminatoi.

Example:
<.<SST

Set a new fiienuly name
SKTRES0LT SetNewFiienulyName(
IN SKTBANBLE hBevice,
IN const chai* pszNewFiienulyName
)
{
SKTRES0LT Result=ESKT_N0ERR0R;

TSktScan0bject Scan0bj;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 121/183
memset(&Scan0bj,u,sizeof(Scan0bj);

Scan0bj.Piopeity.IB=kSktScanPiopIuFiienulyNameBevice;
Scan0bj.Piopeity.Type=kSktScanPiopTypeStiing;
Scan0bj.Piopeity.Stiing.pvalue=pszNewFiienulyName;
Scan0bj.Piopeity.Stiing.nLength=
stilen(pszNewFiienulyName);

set the fiienuly name heie
the final iesult shoulu be fetcheu
in the Set Complete hanulei
Result=SktScanSet(hBevice,&Scan0bj);

ietuin Result;
}

U$L$T
O4FHG# H3%R SetNewFiienulyName(ISktScanBevice uevice,Stiing newFiienulyName){
H3%R iesult=SktScanEiiois.@-=7DK/@HH/H;

ISktScan0bject scan0bj=
SktClassFactoiy.*+$,%$-*,./01$*%();
ISktScanPiopeity piopeity=
scan0bj.getPiopeity();

piopeity.setIB(ISktScanPiopeity.piopIu.
2-2%-*,.3+&456L+8$.6"<K,I$:$;8*$);
piopeity.setType(ISktScanPiopeity.types.
2-2%-*,.3+&47<4$-%+8.9);
piopeity.getStiing().setvalue(newFiienulyName);

set the fiienuly name heie
the final iesult shoulu be fetcheu
in the Set Complete hanulei
iesult=uevice.SetPiopeity(scan0bj);
,*64,% iesult;
}

<7T
piivate long SetNewFiienulyName(
ISktScanBevice uevice,
Stiing newFiienulyName
)
{
long iesult = SktScanEiiois.ESKT_N0ERR0R;
ISktScan0bject scan0bj =
SktClassFactoiy.cieateScan0bject();
scan0bj.Piopeity.IB = ISktScanPiopeity.piopIu.kSktScanPiopIuFiienulyNameBevice;
scan0bj.Piopeity.Type =
ISktScanPiopeity.types.kSktScanPiopTypeStiing;
scan0bj.Piopeity.Stiing.value = newFiienulyName;
iesult = uevice.SetPiopeity(scan0bj);
ietuin iesult;
}
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 122/183

=FX*#6GL* <T

-(SKTRES0LT) setFiienulyName:(iu<ISktScanBevice>)uevice FiienulyName: (NSStiing*)fiienulyName{
SKTRES0LT Result=ESKT_N0ERR0R;
iu<ISktScan0bject>scan0bj=nil;
scan0bj=|SktClassFactoiy cieateScan0bjectj;
||scan0bj PiopeityjsetIB:kSktScanPiopIuFiienulyNameBevicej;
||scan0bj PiopeityjsetType:kSktScanPiopTypeStiingj;
||scan0bj PiopeityjsetStiing:fiienulyNamej;

set the fiienuly name heie
the final iesult shoulu be fetcheu
in the set Complete hanulei
Result=|uevice setPiopeity:scan0bjj;
ietuin Result;
}


B=ACT ^3, 6W* a K*,G*K L:J1I "#$%&'( 4K*K 6W* +,G*%NHQ %$5* 5*53,Q 63 K63,*
6W* O,*$5FH* $%N 6W* O3K6$5FH*J AW* 636$H $534%6 3+ #W$,$#6*,K +3, 6W*
+,G*%NHQ %$5*I O,*$5FH* $%N O3K6$5FH* #$%%36 F* FGRR*, 6W$% /] #W$,$#6*,KJ
(+ $ +,G*%NHQ %$5* GK 633 H3%R 63 F* K63,*N $H3%R MG6W 6W* O,*$5FH* $%N
O3K6$5FH*I $% *,,3, C"\Ad(B_&b(2'&)&ECAC) M34HN F* R*%*,$6*N G% 6W*
,*64,% 3+ 6W* "D6"#$%"*6 &'(J

AWGK ,*5$,D N3*K%c6 $OOHQ +3, 6W* a K*,G*K L:J/ 3, aeG.fG K*,G*KJ

',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Stiing Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"FG -4351426 X)X2)*+&-435.=)1*A4%26\3=1K1B%*1
This piopeity gets oi set the secuiity moue of a uevice.

The secuiity moue can be one of the following values:
_$H4* 2*K#,GO6G3%
kSktScanSecuiityNoueNone No secuiity
moue on the
uevice.
kSktScanSecuiityNoueAuthentication Noue
Authentication
on the uevice.
Any host
attempting to
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 123/183
connect to this
uevice will be
askeu foi a PIN
coue
kSktScanSecuiityNoueAuthenticationEnciyption Same as above
but with uata
enciyption
enableu
between the
host anu the
uevice.
kSktScanSecuiityNoueAuthenticationEnciyptionSingleBBAuuiess Same as above
but the uevice
only keeps the
secuiity
infoimation foi
one host.
Connecting to
anothei host
cause the
secuiity
piocess to stait
all ovei again.


<.<SST
These secuiity constants aie uefineu in SktScanPiopIus.h file.

U$L$T
These secuiity constants aie uefineu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.secuiityNoue

<7T
These secuiity constants aie uefineu in
ScanAPI.ISktScanPiopeity.values.secuiityNoue

=FX*#6GL* <T
These secuiity constants aie uefineu in SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 124/183

F/"FH -4351426 X)X2)*+&-435.=-%&J3=1K1B%*1
This piopeity sets a new pin coue foi a connecteu uevice. The new PIN coue shoulu
be a stiing anu cannot be longei than 16 chaiacteis. The new PIN coue will have
effect at the next connection of the uevice. Changing the PIN coue of the connecteu
uevice won't uisconnect uevice. The new PIN coue will be iequiieu by the host when
the uevice connects the next time.
'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable Stiing None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"F! -4351426 X)X2)*+&-435.=K1;121-+%4%&']3&=%&'K1B%*1
This piopeity ueletes the Bluetooth paiiing anu bonuing infoimation fiom the
uevice iuentifieu by its iefeience. 0nce the paiiing anu bonuing infoimation have
been ueleteu fiom the uevice, the uevice stays connecteu. The new paiiing anu
bonuing infoimation will be cieateu at the next connection of the uevice to the host.

This piopeity can only be useu in a Set opeiation anu has one paiametei inuicating
if the paiiing anu bonuing infoimation shoulu be ueleteu foi all the hosts the
scannei might know oi only foi the cuiient host.

A constant has been uefineu foi each of these moues:

B$5* 2*K#,GO6G3%
kSktScanBeletePaiiingCuiient Belete the Paiiing anu Bonuing
infoimation only foi the cuiient host.
kSktScanBeletePaiiingAll Belete the Paiiing anu Bonuing
infoimation foi all the hosts the uevice
may know of.

<.<SST
The uelete anu paiiing constants aie uefineu in SktScanPiopIus.h file.

U$L$T
The uelete anu paiiing constants aie uefineu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.ueletePaiiing

<7T
The uelete anu paiiing constants aie uefineu in
ScanAPI.ISktScanPiopeity.values.ueletePaiiing
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 125/183

=FX*#6GL* <T
The uelete anu paiiing constants aie uefineu in SktScanPiopIus.h file.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"FE -4351426 X)X2)*+&-435.=W1$2341Z+*2346K1<+A;2$K1B%*1
This piopeity sets the connecteu uevice to its factoiy uefaults. The uevice will
powei uown once the factoiy uefaults have been applieu anu the Set Complete has
been sent.



'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable None None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"F/ -4351426 X)X2)*+&-435.=)12-3^14I<<K1B%*1
This piopeity tuins the powei off fiom the uevice causing it to uisconnect.
This piopeity can only be useu in a Set opeiation anu uoesn't have any paiameteis.

This is one of the iaie cases wheie a Set Complete might not be ieceiveu befoie the
uevice uiops the connection. Fiom the application point of view, the uevice iemoval
might come befoie the Set Complete timeout eiioi. If the application closes iight
away the uevice upon ieception of the uevice iemoval event, the Set Complete
timeout eiioi will nevei be ieceiveu by the application.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable None None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 126/183
F/"F7 -4351426 X)X2)*+&-435.=]A223&)2+2A$K1B%*1
This piopeity gets the button status of the connecteu uevice.
The button status is coueu in one byte as a bit fielu inuicating the status of each
button on the uevice.

A set of macios can be useu in oiuei to ietiieve the status of a paiticulai button. The
macio ietuins a Boolean to inuicate if the button is piesseu (tiue) oi ieleaseu (false)
oi, in the case of the Seiies 9 Ring Scannei, it is uetacheu (tiue) oi attacheu (false).

The macio uefinitions can be founu in paiagiaph 1S.6.S Buttons Event.

<.<SST
The helpei macio can be founu in the SktScanPiopIus.h file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"F> -4351426 X)X2)*+&-435.=)3A&=J3&<%'K1B%*1
This piopeity gets oi sets the sounu configuiation of the connecteu uevice.

Each action can have its own sounu uefinition.
Beie is the list of possible actions:
B$5* 2*K#,GO6G3%
kSktScanSounuActionTypeuoouScan Sounu playeu when a goou scan occuis
when the host is senuing a positive
uata confiimation
kSktScanSounuActionTypeuoouScanLocal Sounu playeu when the uevice locally
acknowleuges a goou scan.
kSktScanSounuActionTypeBauScan Sounu playeu when a bau scan occuis
when the host is senuing a negative
uata confiimation
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 127/183
kSktScanSounuActionTypeBauScanLocal Sounu playeu when the uevice locally
acknowleuges a bau scan. This can
occui when a scan is uone in a
uisconnecteu state. This action is N0T
suppoiteu in the 1B scanneis
(7CiBiNiPi, 8Ci, CRS9). It will
ietuin ESKT_N0TS0PP0RTEB.

A sounu configuiation is composeu of two paiameteis; the numbei of tones anu the
tones. A tone is uefineu by its fiequency, its uuiation anu the pause befoie the next
tone.
These paiameteis aie expiesseu as 16 bit woius in big-enuian foimat.

The fiequency can be set to one of the following values:
B$5* 2*K#,GO6G3%
kSktScanSounuFiequencyNone No sounu
kSktScanSounuFiequencyLow Low fiequency sounu
kSktScanSounuFiequencyNeuium Neuium fiequency sounu
kSktScanSounuFiequencyBigh Bigh fiequency sounu

The uuiation anu the pause aie expiesseu in milliseconus. The minimum anu
maximum values aie in the table below.

The sounu configuiation is summaiizeu in the following table:
B$5* "G[* ',*K*%6 2*K#,GO6G3%
Sounu Action 2 bytes uet Complete, Set Configuiation of a
paiticulai sounu
action.
Numbei of Tones 2 bytes uet Complete, Set Befine the numbei of
tones piesent in this
configuiation. The
maximum numbei of
tones is five (S).
Fiequency Tone 1 2 bytes uet Complete, Set Befine the fiequency
of the fiist tone.
Buiation Tone 1 2 bytes uet Complete, Set Befine the uuiation of
the fiist tone. The
uuiation iange is Su
(uxS2) to S2767
(ux7FFF) foi the
7XiQi anu 12u (ux78)
to 2uuu(ux7Bu) foi
the 1B scanneis
(7CiBiPiNi & 8Ci)
Pause Tone 1 2 bytes uet Complete, Set Befine the pause
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 128/183
length of the fiist tone.
The pause iange is
fiom Su (uxS2) to
S2767 (ux7FFF) foi
the 7XiQi anu 12u
(ux78) to
2uuu(ux7Bu) foi the
1B
scanneis(7CiBiPiNi
& 8Ci)
. same S last
fielus foi the
subsequent tones
until Numbei of
Tones is ieacheu


The uet iequest piopeity uses only a byte value to iequest the configuiation of a
paiticulai sounu action.


The following is an example of an aiiay that can be useu foi the Set iequest:

g3,N _$H4*K 2*K#,GO6G3%
kSktScanSounuActionTypeuoouScanLocal Configuiation foi the uoou Scan Local
Sounu
uxuuu2 2 tones
kSktScanSounuFiequencyBigh Tone 1: fiequency Bigh
uxuuC8 Tone 1: uuiation 2uums
uxuu64 Tone 1: pause 1uums
kSktScanSounuFiequencyLow Tone 2: fiequency Low
uxuuC8 Tone 2: uuiation 2uums
uxuu64 Tone 2: pause 1uums

The uet opeiation iequiies its piopeity byte value to be set to the action the
application woulu like to ietiieve foi the sounu configuiation. The uet Complete
opeiation ietuins an aiiay of bytes with the fiist woiu as the sounu action followeu
by two bytes of the numbei of tones, anu then the six bytes iequiieu foi each tone.

Foimat of the uet Complete Aiiay:
=++K*6 "G[* 2*K#,GO6G3%
u 2 bytes Sounu Action iuentifiei
2 2 bytes Numbei of tones
4 2 bytes Tone 1 fiequency
6 2 bytes Tone 1 Buiation
8 2 bytes Tone 1 Pause
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 129/183
. . Repeat the last 6 bytes foi the next tone


The Set opeiation follows the same piinciple with its piopeity type set to an aiiay,
with the fiist woiu set to the action that neeus to be mouifieu, the following two
bytes set to the numbei of tones that must be playeu when this action occuis, anu
followeu by six bytes foi each tone.

Foimat of the Set Aiiay:
=++K*6 "G[* 2*K#,GO6G3%
u 2 bytes Sounu Action iuentifiei
2 2 bytes Numbei of tones
4 2 bytes Tone 1 fiequency
6 2 bytes Tone 1 Buiation
8 2 bytes Tone 1 Pause
. . Repeat the last 6 bytes foi the next tone


<.<SST
The constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinitions can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.sounuActionType anu
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.sounuFiequency.

<7T
The constant uefinitions can be founu in
ScanAPI.ISktScanPiopeity.values.sounuActionType anu
ScanAPI.ISktScanPiopeity.values.sounuFiequency.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Byte Aiiay Aiiay None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"FC -4351426 X)X2)*+&-435.=D%:14$K1B%*1
This piopeity gets oi sets the vaiious Timeis of the connecteu uevice. Theie aie
thiee timeis that can be mouifieu. The fiist is the tiiggei lock out timei, which is the
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 130/183
time the tiiggei is lockeu out. If the uevice ieceives a confiimation fiom the host, it
then unlocks the tiiggei, otheiwise the tiiggei lock out timeout occuis anu unlocks
the tiiggei. The othei timeis aie useu to know when to tuin the uevice off when no
activity is uetecteu. These timeis aie uepenuent on the uevice connection state.
Theie is one timei when the uevice is in uisconnecteu state anu a seconu one foi
when the uevice is in a connecteu state. When the timeout is ieacheu the uevice
tuins itself off.

The fiist paiametei of this piopeity is a mask to inuicate foi which timei the values
shoulu be mouifieu.
All the paiameteis aie expiesseu in 16 bit woius in big-enuian foimat.

The following table uesciibes the paiameteis foimat useu in the piopeity foi the Set
0peiation anu the uet Complete iesponse:

B$5* "G[* 2*K#,GO6G3%
Timeis Nask 2 bytes Nask inuicating which timei is involveu
in the following paiameteis. The mask
can a combination of any of the
following values:
kSktScanTimeiTiiggeiAutoLockTimeout
kSktScanTimeiPowei0ffConnecteu
kSktScanTimeiPowei0ffBisconnecteu
Tiiggei Lock out
timei
2 bytes Time in 14 seconu inciements foi the
tiiggei to be lockeu out.
Bisconnecteu auto
off time
2 bytes Time in minutes to leave powei on
when no activity is uetecteu anu theie is
no connection to any host.
Connecteu auto off
time
2 bytes Time in minutes to leave powei on
when no activity is uetecteu while
connecteu to a host.

B=ACT
0n the 7 seiies, the Set opeiation cannot set the tiiggei lockout timei at the same
time as the connecteu powei off timei oi uisconnecteu powei off timei. If the set
opeiation has the timei mask set to kSktScanTimeiTiiggeiAutoLockTimeout anu
any of the othei values, the iesult will always fail with an invaliu paiametei eiioi.

Foi the 7XiQi seiies, theie is no such iestiiction but it is iecommenueu to upuate
the Tiiggei Lock out Timeout sepaiately so the opeiation will always succeeu
whatevei uevice seiies is useu.

Auuitionally, the highest tiiggei lockout timei value suppoiteu by the 7 seiies 1B
scanneis is 2SS, oi 6S.7S seconus. Any highei value will geneiate an invaliu
paiametei eiioi.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 131/183

<.<SST
The constant uefinition can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinition can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.timeis

<7T
The constant uefinition can be founu in
ScanAPI.ISktScanPiopeity.values.timeis.

=FX*#6GL* <T
The constant uefinition can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Aiiay Aiiay None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"GL -4351426 X)X2)*+&-435.=_3*+;,*X&3^;1=':1&2K1B%*1
This piopeity is useu to configuie oi ietiieve the uevice local acknowleugment
setting.
If the local acknowleugment is tuineu on, the uevice will acknowleuge the uecoueu
uata. If the local acknowleugment is tuineu off, the uevice won't acknowleuge the
uecoueu uata anu the tiiggei button is lockeu until the host acknowleuges the uata
oi until the tiiggei lockout time has elapseu. The host can acknowleuge the uecoueu
uata by using the kSktScanPiopIuBataConfiimationBevice piopeity. Bepenuing on
how the ScanAPI kSktScanPiopIuBataConfiimationNoue is set, ScanAPI can confiim
the uecoueu uata automatically. Please iefei to paiagiaph Bata confiimation
featuie.

The local acknowleugment byte value is uefineu as follows:
B$5* 2*K#,GO6G3%
kSktScanBeviceBataAcknowleugment0ff Tuin off the uevice local
acknowleugment.
kSktScanBeviceBataAcknowleugment0n Tuin on the uevice local
acknowleugment


<.<SST
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 132/183
The constant uefinition can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinition can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.uataAcknowleugment

<7T
The constant uefinition can be founu in
ScanAPI.ISktScanPiopeity.values.uataAcknowleugment.

=FX*#6GL* <T
The helpei macio can be founu in the SktScanPiopIus.h file.

',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"GF -4351426 X)X2)*+&-435.=K+2+J3&<%4:+2%3&K1B%*1
This piopeity acknowleuges positively oi negatively on uecoueu uata. This piopeity
is mostly useu by the application when the ScanAPI Bata Confiimation Noue has
been set to kSktScanBataConfiimationNoueApp.

This piopeity can be sent at any time by the application to make the uevice beep,
flash oi iumble.

The value is a S2-bit value that can be uefineu using the following helpei macio:
SKTBATAC0NFIRNATI0N. This macio accepts 4 paiameteis. The fiist one is
ieseiveu anu shoulu be set to u. The seconu one is the iumble anu it can have the
following values:
_$H4* 2*K#,GO6G3%
kSktScanBataConfiimationRumbleNone Bon't iumble the uevice
kSktScanBataConfiimationRumbleuoou Rumble the uevice to notify a goou
action
kSktScanBataConfiimationRumbleBau Rumble the uevice to notify an incoiiect
action.

The thiiu paiametei is useu to uefine the beep anu it coulu be one of the following
values:
_$H4* 2*K#,GO6G3%
kSktScanBataConfiimationBeepNone Bon't make the uevice beep
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 133/183
kSktScanBataConfiimationBeepuoou Beep the uevice to inuicate a goou action.
This beep is configuiable using the
kSktScanPiopIuSounuConfigBevice
piopeity with
kSktScanSounuActionTypeuoouScan as
paiametei.
kSktScanBataConfiimationBeepBau Beep the uevice to inuicate an incoiiect
action.
This beep is configuiable using the
kSktScanPiopIuSounuConfigBevice
piopeity with
kSktScanSounuActionTypeBauScan as
paiametei.

The last paiametei is to uefine the LEB behavioi anu it can have one of the following
values:
_$H4* 2*K#,GO6G3%
kSktScanBataConfiimationLeuNone Bon't flash the LEB
kSktScanBataConfiimationLeuuieen Flash the LEB in gieen
kSktScanBataConfiimationLeuReu Flash the LEB in ieu

B=ACT
A flag inuicating a goou scan cannot be mixeu with a flag inuicating a bau scan
otheiwise an eiioi ESKT_INvALIB_PARANETER (-18) will be geneiateu. By
example kSktScanBataConfiimationRumbleBau cannot be useu in conjunction with
kSktScanBataConfiimationBeepuoou anu kSktScanBataConfiimationLeuuieen. A
"none" flag can be in eithei case.


<.<SST
The helpei macio anu the constant uefinitions can be founu in the SktScanPiopIus.h
file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei.
The constant uefinition can be founu in
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.uataConfiimation

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei.
The constant uefinition can be founu in
ScanAPI.ISktScanPiopeity.values.uataConfiimation

=FX*#6GL* <T
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 134/183
The helpei macio anu the constant uefinitions can be founu in the SktScanPiopIus.h
file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable 0long None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"GG -4351426 X)X2)*+&-435.=]+22146_1B1;K1B%*1
This piopeity ietiieves the batteiy level of a connecteu uevice.
The batteiy level is uesciibeu in a 0long.
The vaiious batteiy infoimation containeu in this 0long can be ietiieveu using a set
of macios that aie uefineu in the paiagiaph 1S.6.S Batteiy Level Event.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0long Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

See also:
1S.6.S Batteiy Level Event
F/"GH -4351426 X)X2)*+&-435.=_3*+;K1*3=1,*2%3&K1B%*1
This piopeity configuies oi ietiieves the local uecoue action of the uevice.

The local uecoue action can be one oi a combination of the following values:
B$5* 2*K#,GO6G3%
kSktScanLocalBecoueActionNone No action iequiieu
kSktScanLocalBecoueActionBeep Beep when goou uecoueu uata aie
scanneu
kSktScanLocalBecoueActionFlash Flash uieen LEB when goou uecoueu
uata is scanneu
kSktScanLocalBecoueActionRumble Rumble when goou uecoueu uata is
scanneu

B=ACT
The iumble is not available on all uevices. It will be ignoieu if the uevice uoesn't
suppoit iumble.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 135/183
<.<SST
The constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinitions can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.localBecoueAction.

<7T
The constant uefinitions can be founu in
ScanAPI.ISktScanPiopeity.values.localBecoueAction

=FX*#6GL* <T
The constant uefinitions can be founu in the SktScanPiopIus.h file.

',3O*,6Q 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

See also
19 Bata confiimation featuie
F/"G! -4351426 X)X2)*+&-435.=];A12332@,==41$$
This piopeity can be useu to ietiieve the uevice Bluetooth auuiess.
The Bluetooth uevice auuiess is ietuineu in an aiiay of 6 bytes.

B=ACT AW* a K*,G*K L:J1 N*LG#*K N3%c6 K4OO3,6 6WGK O,3O*,6QJ &%
C"\AdB=A"h''=)AC2 *,,3, MGHH F* ,*64,%*N G% 6W* ?*6 <35OH*6* *L*%6 +3,
6W*K* N*LG#*KJ

In }ava only, ScanAPI pioviues a static function to conveit this Bluetooth auuiess
aiiay of 6 bytes into a stiing. It can be founu in Skt}ava.helpei. This function is
foimatBluetoothAuuiess.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Aiiay Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 136/183
F/"GE -4351426 X)X2)*+&-435.=)2+2%$2%*J3A&214$K1B%*1
This piopeity ietiieves the statistic counteis of the uevice.
The statistic counteis can be uiffeient fiom one uevice type to anothei. The fiist 2
bytes of the aiiay ietuineu in the uet Complete message inuicates the numbei of
counteis ietuineu in the aiiay. Each countei is composeu by 2 long integeis (4
bytes), the fiist long integei is the countei iuentifiei anu the seconu long integei is
the actual countei value. This aiiay is uesciibeu as follows:
B$5* B45F*, 3+ `Q6*K 2*K#,GO6G3%
Count 2 bytes Numbei of IBCountei in the aiiay
Countei IB 4 bytes Repiesents the countei IB (see below)
Countei 4 bytes Repiesents the actual countei
Countei IB 4 bytes Repiesents the countei IB (see below)
Countei 4 bytes Repiesents the actual countei
. . .


The following IBs aie uefineu in the table below, note that not all items aie available
in all scanneis anu some aie piesent but not useu (e.g. the Ring ones on the CBS7
anu CBS8 scanneis):
B$5* 2*K#,GO6G3%
kSktScanCountei0nknown Countei is unknown. This might be
because a newei veision of the
uevice has implementeu new
countei.
kSktScanCounteiConnect Countei iepiesents the numbei of
times a connection has been maue.
kSktScanCounteiBisconnect Countei iepiesents the numbei of
times a uisconnection has been
maue.
kSktScanCountei0nbonu Countei iepiesents the numbei of
times a un-bonu commanu has been
maue.
kSktScanCounteiFactoiyReset Countei iepiesents the numbei of
times the uevice went thiough a
Factoiy ieset.
kSktScanCounteiScans Countei iepiesents the numbei of
times the uevice scans a baicoue.
(7XiQi only)
kSktScanCounteiScanButton0p Countei iepiesents the numbei of
times the scan button has been
ieleaseu.
kSktScanCounteiScanButtonBown Countei iepiesents the numbei of
times the scan button has been
piesseu.
kSktScanCounteiPoweiButton0p Countei iepiesents the numbei of
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 137/183
times the powei button has been
ieleaseu
kSktScanCounteiPoweiButtonBown Countei iepiesents the numbei of
time the powei button has been
ieleaseu.
kSktScanCounteiPowei0nACTimeInNinutes Countei iepiesents the numbei of
minutes the uevice has been
poweieu on AC.
kSktScanCounteiPowei0nBatTimeInNinutes Countei iepiesents the numbei of
minutes the uevice has been
poweieu on batteiy.
kSktScanCounteiRfcommSenu Countei iepiesents the numbei of
times a Bluetooth RFC0NN packet
has been sent.
kSktScanCounteiRfcommReceive Countei iepiesents the numbei of
times a Bluetooth RFC0NN packet
has been ieceiveu.
kSktScanCounteiRfcommReceiveBiscaiueu Countei iepiesents the numbei of
times a Bluetooth RFC0NN packet
has been ieceiveu anu uiscaiueu.
kSktScanCountei0aitSenu Countei iepiesents the numbei of
times the 0ART senus a packet.
kSktScanCountei0aitReceive Countei iepiesents the numbei of
times the 0ART ieceives a packet.
kSktScanCounteiButtonLeftPiess Countei iepiesents the numbei of
times the left button has been
piesseu on the Coiuless Ring
Scannei (CSR)
kSktScanCounteiButtonLeftRelease Countei iepiesents the numbei of
times the left button has been
ieleaseu on the CSR
kSktScanCounteiButtonRightPiess Countei iepiesents the numbei of
times the iight button has been
piesseu on the CSR
kSktScanCounteiButtonRightRelease Countei iepiesents the numbei of
times the iight button has been
piesseu on the CSR
kSktScanCounteiRing0nitBetachEvents Countei iepiesents the numbei of
times the CSR Ring unit has been
uetacheu fiom the wiist unit
kSktScanCounteiRing0nitAttachEvents Countei iepiesents the numbei of
times the CSR Ring unit has been
atttacheu to the wiist unit
kSktScanCounteiBecoueuBytes Countei iepiesents the numbei of
bytes that have been uecoueu(7XiQi
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 138/183
only)
kSktScanCounteiAbnoimalShutBowns Countei iepiesents the numbei of
abnoimal shutuowns(7XiQi only)
kSktScanCounteiBatteiyChaigeCycles Countei iepiesents the numbei of
times batteiy has gone thiough a
chaigeuischaige cycle(7XiQi only)
kSktScanCounteiBatteiyChangeCount Countei iepiesents the numbei of
times the batteiy has been
changeu(7XiQi only)
kSktScanCounteiPowei0n Numbei of times scannei has been
poweieu on (8Ci only)
kSktScanCounteiPowei0ff Numbei of times scannei has been
poweieu off (8Ci only)

<.<SST
The constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinition can be founu in
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.counteis.

<7T
The constant uefinition can be founu in
ScanAPI.ISktScanPiopeity.values.counteis.

=FX*#6GL* <T
The constant uefinitions can be founu in the SktScanPiopIus.h file.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Aiiay Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"G/ -4351426 X)X2)*+&-435.=WA:S;1J3&<%'K1B%*1
This piopeity can be useu to ietiieve oi to set the configuiation of the Rumble
featuie of the uevice.
Some uevices uon't suppoit the iumble featuie. In that case an eiioi
(ESKT_N0TS0PP0RTEB) is geneiateu if an application is tiying to set oi get this
piopeity.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 139/183
A iumble has two configuiable paiameteis; the 0n uuiation anu the 0ff uuiation.
The 0n uuiation is the time the iumble is active, anu the 0ff uuiation is the time the
iumble is inactive.

Theie aie foui actions that can be configuieu with a iumble anu they aie uesciibeu
in the following table:

B$5* 2*K#,GO6G3%
kSktScanRumbleActionTypeuoouScan Rumble action when a goou scan
occuis
kSktScanRumbleActionTypeuoouScanLocal Rumble action when the uevice locally
acknowleuges a goou scan.
kSktScanRumbleActionTypeBauScan Rumble action when a bau scan occuis
kSktScanRumbleActionTypeBauScanLocal Runble action when the uevice locally
acknowleuges a bau scan

The iumble configuiation can be uesciibeu as below:
B$5* "G[* ',*K*%6 2*K#,GO6G3%
Rumble Action 2 bytes uet Complete, Set Configuiation of a
paiticulai Rumble
action.
Numbei of
Rumbles
2 bytes uet Complete, Set Befine the numbei
of Rumble piesent
in this
configuiation. The
maximum numbei
of iumbles is S.
0n uuiation 2 bytes uet Complete, Set Befine the uuiation
when the iumble is
active. The 0n
uuiation iange is
Su (uxS2) to S2767
(ux7FFF)
0ff uuiation 2 bytes uet Complete, Set Befine the uuiation
when the iumble is
inactive. The 0ff
uuiation iange is
Su (uxS2) to S2767
(ux7FFF).
. same 2 last fielus
foi the subsequent
iumble uefinitions
until Numbei of
Rumbles is
ieacheu.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 140/183

The uet iequest piopeity is uses only a byte value to iequest the configuiation of a
paiticulai iumble action.

Example showing the aiiay that is uefineu in the piopeity uuiing a Set iequest:
g3,N _$H4*K 2*K#,GO6G3%
kSktScanRumbleActionTypeuoouScanLocal Configuiation foi the uoou Scan Local
Rumble
uxuuu2 2 iumbles
uxuuC8 Rumble 1 0n Buiation :2uums
uxuu64 Rumble 1 0ff Buiation:1uums
uxuuC8 Rumble 2 0n Buiation: 2uums
uxuu64 Rumble 2 0ff Buiation:1uums


<.<SST
These constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
These constant uefinitions can be founu in
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.iumbleActionType.

<7T
These constant uefinitions can be founu in
ScanAPI.ISktScanPiopeity.values.iumbleActionType.

=FX*#6GL* <T
These constant uefinitions can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Byte Aiiay Aiiay None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei
F/"G7 -4351426 X)X2)*+&-435.=-43<%;1J3&<%'K1B%*1
This piopeity ietiieves oi set the cuiient piofile configuiation of a uevice.
The Piofile Configuiation can be uesciibeu as shown in the following table:
B$5* B45F*, 3+
`Q6*K
2*K#,GO6G3%
Piofile 2 bytes kSktScanPiofileSelectBiu (uxuuuu) foi BIB
oi kSktScanPiofileSelectSpp (uxuuu1) foi
SPP (big-enuian foimat)
Role 2 bytes kSktScanPiofileConfigAcceptoi (uxuuuu) foi
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 141/183
Acceptoi oi kSktScanPiofileConfigInitiatoi
(uxuuu1) foi Initiatoi (big-enuian foimat)
Bluetooth auuiess 6 bytes 6 bytes of Bluetooth auuiess.
Class 0f Bevice S bytes S bytes of Bluetooth Class 0f Bevice (C0B)
Extia pauuing
byte
1 byte This pauuing byte is to make this aiiay size
even. Nust be set to u.

The piofile will take action only on the next connection. The host can senu a
uisconnect iequest with a paiametei inuicating the uevice shoulu stait its piofile
configuiation.

By specifying a Bluetooth auuiess of a host uevice in the initiatoi moue, will cause
the uevice to connect to this host the next time it initiates a connection.

<.<SST
The constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinition can be founu in
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.piofile anu
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.piofileConfig.

<7T
The constant uefinition can be founu in
ScanAPI.ISktScanPiopeity.values.piofile anu
ScanAPI.ISktScanPiopeity.values.piofileConfig

=FX*#6GL* <T
The constant uefinitions can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Aiiay Aiiay None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"G> -4351426 X)X2)*+&-435.=K%$*3&&1*2K1B%*1
This piopeity can be useu to uisconnect the uevice. Theie aie 2 moues of
uisconnection. The stait piofile moue will uisconnect the uevice anu the uevice will
then stait the cuiient piofile. The uisable iauio moue instiucts the uevice to
uisconnect anu set the iauio into a low powei moue. In that moue the uevice cannot
be uiscoveiable oi connectable.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 142/183
This piopeity has a byte value that neeus to be set to one of these two moues.
Constant uefinitions exist to cleaily iuentify these moues anu they aie uesciibeu as
shown below:
B$5* 2*K#,GO6G3%
kSktScanBisconnectStaitPiofile Ask the uevice to uisconnect anu stait its
cuiient selecteu piofile.
kSktScanBisconnectBisableRauio Ask the uevice to uisconnect anu uisable
its iauio.

<.<SST
The constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinitions can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.uisconnect.

<7T
The constant uefinition can be founu in
ScanAPI.ISktScanPiopeity.values.uisconnect

=FX*#6GL* <T
The constant uefinitions can be founu in the SktScanPiopIus.h file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Not applicable Not applicable Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"GC -4351426 X)X2)*+&-435.=K+2+)2341K1B%*1
This piopeity allows setting oi getting uata fiom the Bata stoie in the uevice. The
benefit of this featuie is to stoie infoimation in the uevice itself that can be useu by
the host.
The uata stoie has 16 stoiage locations, each iuentifieu by a key value of u to 1S.
Each location can stoie anywheie fiom u to 64 bytes.

A uata stoie is iuentifieu as shown in the table below:
B$5* B45F*, 3+ FQ6*K ',*K*%6 2*K#,GO6G3%
Key 2 bytes In uet, Set, anu
uet complete.
Contains the uata
stoie iuentifiei fiom
u to 1S (big-enuian)
Length 2 bytes In Set, anu uet
complete.
Contains the size of
the stoie (big-
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 143/183
enuian), max 64.
Bata vaiiable In Set anu uet
complete.
Contains uata of the
stoie.

As uesciibeu in the pievious table, the Key fielu is the only fielu iequiieu foi a uet
iequest. The key must be a value between u anu 1S.

The Bata fielu might be empty in the Set iequest if anu only if the Length is set to u.
In that paiticulai settings the uata stoie coiiesponuing to the key will be ueleteu.

The Bata fielu can be filleu with u anu the Length fielu inuicates the numbei of u's to
wiite to the uata stoie up to 64 maximum.



B=ACT

This featuie is available in the entiie 7 seiies of CBS mouel scanneis howevei 0NLY
the 7X anu 7XiQi mouels suppoit all 16 stoiage locations while the 7C, 7Ci, 7Ni, 7Pi
anu 8Ci mouel scanneis with a minimum fiimwaie of S.S 0NLY suppoit one anu that
is key # u. If you attempt a set oi get outsiue of key # u foi these scanneis it will
ietuin ESKT_N0TS0PP0RTEB eiioi message.

You can check the fiimwaie of the scannei to veiify scannei mouel suppoit using
the kSktScanPiopIuveisionBevice commanu oi checking the iesult on the uefault
init iesult on the 0nScanneiFiimwaie:scan0bject


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
Aiiay Aiiay Aiiay None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

F/"HL -4351426 X)X2)*+&-435.=M32%<%*+2%3&$K1B%*1
This piopeity uefines the notifications the uevice can senu to the host.

The notifications can be one oi a combination of the following values:
B$5* 2*K#,GO6G3%
kSktScanNotificationsScanButtonPiess Notify the host when the Scan button is
piesseu
kSktScanNotificationsScanButtonRelease Notify the host when the Scan button is
ieleaseu.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 144/183
B=AC: This flag is not suppoiteu on 7
seiies veision S.2 oi lowei.
kSktScanNotificationsPoweiButtonPiess Notify the host when the Powei button
is piesseu.
kSktScanNotificationsPoweiButtonRelease Notify the host when the Powei button
is ieleaseu.
kSktScanNotificationsPoweiState Notify the host when the Powei state
has changeu. (The powei state changes
when the uevice is pluggeu into an AC
powei auaptei oi in a ciaule.)
B=AC: This flag is not suppoiteu on 7
seiies veision S.2 oi lowei.
kSktScanNotificationsBatteiyLevelChange Notify the host when the batteiy level
has changeu.
B=AC: This flag is not suppoiteu on 7
seiies veision S.2 oi lowei.

<.<SST
The constant uefinitions can be founu in the SktScanPiopIus.h file.

U$L$T
The constant uefinitions can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.notifications

<7T
The constant uefinitions can be founu in
ScanAPI.ISktScanPiopeity.values.notifications

=FX*#6GL* <T
The constant uefinitions can be founu in the SktScanPiopIus.h file.


'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0long 0long None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"HF -4351426 X)X2)*+&-435.=J3&&1*2W1+$3&K1B%*1
This piopeity ietiieves the infoimation on how the uevice is connecteu to the host.

The connect ieasons aie summaiizeu in the following table:
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 145/183
B$5* _$H4* 2*K#,GO6G3%
kSktScanConnectReason0nknown uxuu 0nknown ieason
kSktScanConnectReasonPowei0n uxu1 Bevice poweieu on
kSktScanConnectReasonBaicoue uxu2 Bevice scanneu a connect baicoue
kSktScanConnectReason0seiAction uxuS 0sei piess a button while Bevice was
in iule moue
kSktScanConnectReasonBostChange uxu4 A host has changeu the Bevice Role
anu the new Role has been activateu.
kSktScanConnectReasonRetiy uxuS The Bevice was uisconnecteu
acciuently anu has ieconnecteu.

<.<SST
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

U$L$T
The constant uefinitions can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.connectReason.

<7T
The constant uefinitions can be founu in
ScanAPI.ISktScanPiopeity.values.connectReason.

=FX*#6GL* <T
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

B=ACT
This featuie is only available in the 7XiQi seiies, an ESKT_N0TS0PP0RTEB eiioi is
ietuineu foi the othei seiies.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei


F/"HG -4351426 X)X2)*+&-435.=-3^14)2+21K1B%*1
This piopeity ietiieves the powei state of a connecteu uevice.
The powei state is uesciibeu in a uouble woiu anu can be ietiieveu using a helpei
macio that is uefineu in the paiagiaph iegaiuing the Powei Event notification.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 146/183
The powei states can be uesciibeu as follow:
B$5* _$H4* 2*K#,GO6G3%
kSktScanPoweiStatus0nknown uxuu The powei state is unknown. Nost
likely a uevice not suppoiting this
featuie such as eailiei veision of CBS
(vS.1)
kSktScanPoweiStatus0nBatteiy uxu1 The uevice is cuiiently iunning on
batteiy.
kSktScanPoweiStatus0nCiaule uxu2 The uevice is cuiiently iunning fiom
the ciaule.
kSktScanPoweiStatus0nAc uxu4 The uevice is cuiiently pluggeu to the
AC powei.

<.<SST
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei anu the
constant uefinition can be founu in
com.SocketNobile.ScanAPI.ISktScanPiopeity.values.poweiStates.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei anu the constant
uefinition can be founu in ScanAPI.ISktScanPiopeity.values.poweiStates.

=FX*#6GL* <T
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0long Not applicable Not applicable

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

See also:
1S.6.1 Powei Event

F/"HH -4351426 X)X2)*+&-435.=)2+42#5W3;1)--K1B%*1
This piopeity ietiieves oi mouifies the peisistence of a uevice Seiial Poit Piofile
(SPP) iole. The Seiies 7 scanneis have theii SPP iole set to peisistent by uefault. If a
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 147/183
scannei scans a connect baicoue to connect to a host, then each time this scannei is
poweieu on, it will tiy to connect to the last host.
This featuie can be tuineu off using this piopeity. If it is tuineu off, the scannei will
neeu to scan a connect baicoue each time it neeus to connect to a host.
The scannei ietiy featuie stays unchangeu whatevei the Stait 0p Role is.

This piopeity paiametei is a byte value.

Theie aie two possible values foi this piopeity anu they aie uefineu as shown in
this table:

B$5* _$H4* 2*K#,GO6G3%
kSktScanStait0pRoleSPPAcceptoi uxuu Not peisistent, the scannei goes back to
acceptoi each time the scannei staits
up.
kSktScanStait0pRoleSPPLastRole uxu1 Peisistent, the scannei uses the last
iole each time the scannei staits up.

<.<SST
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei anu the
constant uefinition can be founu in
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.stait0pRoleSpp.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei anu the constant
uefinition can be founu in ScanAPI.ISktScanPiopeity.values.stait0pRoleSpp.

=FX*#6GL* <T
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

B=ACT
This featuie is only available in the 7XiQi seiies, an ESKT_N0TS0PP0RTEB eiioi is
ietuineu foi the othei seiies.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 148/183


F/"H! -4351426 X)X2)*+&-435.=J3&&1*2%3&]115J3&<%'K1B%*1
This piopeity configuies oi ietiieves the cuiient configuiation on how the scannei
beeps when it connects to a host.
The scannei can automatically beep when it foims a SPP connection to the host. By
uefault the scannei uoesn't beep when it connects to a host in SPP moue, anu
insteau ScanAPI will senu a uata confiimation to the scannei to make it beep.

If the scannei is useu without ScanAPI in SPP moue, the connection beep can be
configuieu using this piopeity so the scannei beeps each time it connects.

This piopeity value is a byte anu heie is a table that summaiizes the 2 possible
values useu with this piopeity:

B$5* _$H4* 2*K#,GO6G3%
kSktScanConnectBeepConfigNoBeep uxuu The scannei won't automatically
beep when it connects to the host,
ScanAPI if useu, will make the
scannei beep.
kSktScanConnectBeepConfigBeep uxu1 The scannei automatically beeps
when it foims a SPP connection to a
host.


<.<SST
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

U$L$T
The helpei macio can be founu in com.SocketNobile.ScanAPI.SktScan.helpei anu the
constant uefinition can be founu in
Com.SocketNobile.ScanAPI.ISktScanPiopeity.values.connectBeepConfig.

<7T
The helpei macio can be founu in ScanAPI.SktScan.helpei anu the constant
uefinition can be founu in ScanAPI.ISktScanPiopeity.values.connectBeepConfig.

=FX*#6GL* <T
The helpei macio anu the constant uefinition can be founu in the SktScanPiopIus.h
file.

B=ACT
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 149/183
This featuie is only available in the 7XiQi seiies, an ESKT_N0TS0PP0RTEB eiioi is
ietuineu foi the othei seiies.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.u oi highei

16.35 Property kSktScanPropIdFlashDevice
This piopeity is useu only with a SoftScan uevice. It tuins the flash on oi off foi
impioving the baicoue scanning opeiation using the uevice cameia.

This piopeity value is a byte anu heie is a table that summaiizes the 2 possible
values useu with this piopeity:

B$5* 2*K#,GO6G3%
kSktScanFlash0n Tuin the flash on when useu in the
Set opeiation oi the flash is 0N when
ietiieveu in the uet Complete
iesponse
kSktScanFlash0ff Tuin the flash off when useu in the
Set opeiation oi the flash is 0FF
when ietiieveu in the uet Complete
iesponse.

B=ACT
This featuie is only available in the SoftScan scannei, an ESKT_N0TS0PP0RTEB
eiioi is ietuineu foi the othei uevices.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None Byte Byte None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei


16.36 Property kSktScanPropIdOverlayViewDevice
This piopeity is useu with the SoftScan featuie. It gives a iefeience of the paient
view to the 0veilay view wheie the cameia output can be uisplayeu. The 0veilay
view contains buttons foi the flash, foi cancelling the tiiggei opeiation, oi foi
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 150/183
making a iotation of the cameia's view. This piopeity has to be set befoie tiiggeiing
a scan with the kSktScanTiiggeiBevice piopeity.

The paiametei of this piopeity is a iefeience to a hash table object that might holus
one oi moie paiameteis uepenuing on the platfoim this piopeity is useu.
The following table gives the list of hash key value with theii meaning.

Name Besciiption value type
2-2%-*,.-&N%-*,.?&.%$Q% Refeience to the
application context foi
Anuioiu oi to
Context iefeience foi
Anuioiu, anu
0IviewContiollei foi
i0S uevice.
2-2%-*,.-&N%-*,.C,<&#%56 Refeience to the view of
Layout IB of the view to
uisplay
Integei, Anuioiu only
2-2%-*,.-&N%-*,.A8$RL8.6$+56 Refeience to the view
Finuei IB that is the
iectangle wheie to look
foi a baicoue
Integei, Anuioiu only
anu optional.
2-2%-*,.-&N%-*,.L",G'!#%%&.56 Refeience to the Button
IB that can be useu foi
contiolling the flash
Integei, Anuioiu only
anu optional.
2-2%-*,.-&N%-*,.?,.*$"!#%%&. Text to uisplay foi the
Cancel button
Stiing foi Anuioiu,
NSStiing foi i0S.
If not piesent "Cancel"
text is useu by uefault
2-2%-*,.-&N%-*,.L",G'!#%%&. Coma sepaiateu text foi
the Flash contiols. This
stiing uefines S text; the
name of the contiol, the
0N text anu the 0FF text.
Example:"Flash,0N,0FF"
Stiing foi Anuioiu,
NSStiing foi i0S. If not
piesent then no flash
button is uisplayeu. If
the numbei of coma is
not 2 then an eiioi
ESKT_INvALIBPARANETER is
geneiateu.
2-2%-*,.-&N%-*,.:8+$*%8&.7$Q% Text to uisplay just
beneath the viewfinuei
to give usei uiiection on
how to scan a baicoue
using viewfinuei.
Stiing foi Anuioiu,
NSStiing foi i0S. If not
piesent a uefault
uiiection text in
English is uisplayeu.
An eiioi
ESKT_INvALIBPARANETER is
geneiateu if the stiing
is moie than 128
chaiacteis.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 151/183
The Bash table is a pointei to a NSBictionaiy foi i0S oi to BashNap<Stiing,0bject>
foi Anuioiu.
This Bash table shoulu be passeu to the piopeity 0bject fielu.

0I object useu to uisplay the view taken by the cameia uuiing the scanning
opeiation.

The uet paiametei ietuins the iefeience of the same 0I object useu to uisplay the
view taken by the cameia.

Example:

0bjective C:

/**
* called each time a device connects to the host
* @param result contains the result of the connection
* @param newDevice contains the device information
*/
-(void)onDeviceArrival:(SKTRESULT)result Device:(DeviceInfo*)deviceInfo{
// create a device info object to display the device main
// information in the table view
if (SKTSUCCESS(result)) {
DeviceInfo* devicelisted=[[self.devicelist objectAtIndex:0]
valueForKey:kViewControllerKey];
if (devicelisted==nil) {
[self.devicelist removeObjectAtIndex:0];
}

[self.devicelist addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:
[deviceInfo getName],
kTitleKey,
@"Connected Scanner",
kExplainKey,
deviceInfo,
kViewControllerKey,
nil]];
_devicecount++;
_lastConnected=deviceInfo;
_selectedDevice=nil;// for now no device is selected
if ([[deviceInfo getTypeString] compare:@"SoftScan"]==0) {
UIViewController* pThis=self;
NSMutableDictionary* overlayParameter=[[NSMutableDictionary alloc]init];
[overlayParameter setValue:pThis forKey:[NSString
stringWithCString:kSktScanSoftScanContext encoding:NSASCIIStringEncoding]];
NSLog(@"Send Context:%p",(UIViewController*)[overlayParameter
valueForKey:[NSString stringWithCString:kSktScanSoftScanContext
encoding:NSASCIIStringEncoding]]);
[_scanApiHelper postSetOverlayView:deviceInfo OverlayView:overlayParameter
Target:self Response:@selector(onSetProperty:)];
[overlayParameter release];
}
[self performSelectorOnMainThread:@selector(updateView) withObject:nil
waitUntilDone:NO];

#ifdef _SCANNER_REGISTRATION
// Get the Bluetooth address for check if the Scanner is
// Registered (Developer Program)
// the Registration check will be initiated in the onBdAddress
// callback that should have the Bluetooth address of the scanner
[_scanApiHelper postGetBtAddress:_lastConnected Target:self
Response:@selector(onBtAddressForRegistration:)];
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 152/183
#endif
}
else {
UIAlertView *alert=[[UIAlertView alloc]
initWithTitle:@"Error"
message:@"Unable to open the scanner"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}

}


}ava example (Anuioiu only):

scanButton.setOnClickListener(
new OnClickListener(){
public void onClick(View v) {
// this should launch the Overlay Camera View
// The Overlay view should launch the Barcode Sdk view
DeviceInfo device=ScannerSettingsApplication.getInstance().getCurrentDevice();

//ScanAPI Overlay context requires a Context and a Layout ID
// in which the SoftScan Activity will render the camera overlay
Map<String,Object>overlayContext=new HashMap<String,Object>();

overlayContext.put(ISktScanProperty.values.objectMap.kSktScanSoftScanContext,
_context);

overlayContext.put(ISktScanProperty.values.objectMap.kSktScanSoftScanLayoutId,Inte
ger.valueOf(R.layout.scannersettings_softscan_overlay));

overlayContext.put(ISktScanProperty.values.objectMap.kSktScanSoftScanViewFinderId,
Integer.valueOf(R.id.viewfinder));

overlayContext.put(ISktScanProperty.values.objectMap.kSktScanSoftScanFlashButtonId
,Integer.valueOf(R.id.buttonFlash));

ScannerSettingsApplication.getInstance().setSoftScanOverlay(device,
overlayContext);

ScannerSettingsApplication.getInstance().startSoftScanner();
}
}
);




N0TE: This piopeity woiks only with a SoftScan scannei. It ietuins an
ESKT_N0TS0PP0RTEB eiioi if the uevice is not a SoftScan scannei.

'$,$5*6*, 6QO*
?*6 ?*6 <35OH*6* "*6 "*6 <35OH*6*
None 0bject 0bject None

_*,KG3%
ScanAPI Inteiface veision 1.u.1 oi highei
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 153/183








1a "#$%&'( C,,3, W$%NHG%R $%N N*+G%G6G3%K

The iesult of the ScanAPI functions can be negative which means the API faileu, oi it
can be u which means the API succeeueu oi it can be a positive value inuicating the
API succeeus but is ietuining infoimation about its opeiation.

It is stiongly iecommenueu to use the macio SKTS0CCESS() in oiuei to test the
iesult of an API. This macio ietuins tiue if the iesult is u oi positive, anu false
otheiwise.

<.<SST
The ScanAPI eiioi is uefineu by the type SKTRES0LT. All the ScanAPI APIs ietuins a
SKTRES0LT iesult.

U$L$ $%N <7T
The ScanAPI eiioi is uefineu as a long. All the ScanAPI APIs ietuin a long iesult.
The SKTS0CCESS function is uefineu in the SktScanEiiois class as well as the eiioi
coues.



<.<SS *V$5OH*T
SKTRES0LT
BanuleBeviceAiiival(
IN TSktScan0bject* pScan0bj
}
{
SKRES0LT Result=ESKT_N0ERR0R;
SKTBANBLE hBevice=N0LL;

open the scannei
Result=SktScan0pen(pScan0bj->Bevice.uuiu,&hBevice);

if the scannei is successfully open, then
stoie its info into the application
scannei list
if(SKTS0CCESS(Result))
{
Result=AuuScannei(pScan0bj->Bevice.szBeviceName,hBevice);
}
ietuin Result;
}

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 154/183
U$L$ *V$5OH*T

O,GL$6* L3GN BanuleBeviceAiiival(ISktScan0bject scan0bject) {

Stiing fiienulyName=
scan0bject.getNessage().getBeviceName();
Stiing ueviceuuiu=scan0bject.getNessage().getBeviceuuiu();
H3%R type=scan0bject.getNessage().getBeviceType();

ISktScanBevice uevice=
SktClassFactoiy.cieateBeviceInstance(_ScanApi);
H3%R iesult=uevice.0pen(ueviceuuiu);

G+(SktScanEiiois.-=7->??@--(iesult))
{
auu the new uevice into the list
Bevice newBevice=
%*M Bevice(fiienulyName,uevice,type);
KQ%#W,3%G[*N(0iApplication.9$%@;$.%C&*2()){
_uevices.auuElement(newBevice);
G%6 size=_uevices.size();
_uisplayBeviceslist.setSize(size);
}

}
*HK*
{
Status.G'&R("0nable to open the scannei ("+
iesult+")");
}
}

<7 *V$5OH*T

piivate voiu BanuleBeviceAiiival(ISktScan0bject scan0bject)
{
Stiing fiienulyName=scan0bject.Nsg.BeviceName;
Stiing ueviceuuiu=scan0bject.Nsg.Beviceuuiu;
long type=scan0bject.Nsg.BeviceType;
ISktScanBeviceuevice=
SktClassFactoiy.cieateBeviceInstance(_scanApi);
BeviceInfo newBevice=null;
long iesult=uevice.0pen(ueviceuuiu);
if(SktScanEiiois.SKTS0CCESS(iesult))
{
auu the new uevice into the list
newBevice=
new BeviceInfo(fiienulyName,uevice,type);
lock(_uevicesList){
_uevicesList.Auu(newBevice);
_uevicesList.Remove(_noBeviceConnecteu);
}
}
if(_notification!=null)
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 155/183
_notification.0nBeviceAiiival(iesult,newBevice);
}

=FX*#6GL* < *V$5OH*T

hanulei foi a Scannei Aiiival
-(voiu) BanuleBeviceAiiival:(iu<ISktScan0bject>)scan0bject{
NSStiing* fiienulyName=||scan0bject Nsgj BeviceNamej;
NSStiing* ueviceuuiu=||scan0bject Nsgj Beviceuuiuj;
long type=||scan0bject Nsgj BeviceTypej;

cieate a uevice instance anu open the uevice so we can
ieceive events fiom this uevice oi we can set oi get its
piopeities
iu<ISktScanBevice> iBevice=|SktClassFactoiy cieateBeviceInstance:_scanapij;
SKTRES0LT iesult=|iBevice open:ueviceuuiuj;

cieate a uevice info object to uisplay the uevice main
infoimation in the table view
if (SKTS0CCESS(iesult)) {
BeviceInfo* ueviceinfo=||BeviceInfo allocjinit:iBevice name:fiienulyName type:typej;
|self.uevicelist iemove0bjectAtInuex:uj;
|self.uevicelist auu0bject:|NSBictionaiy uictionaiyWith0bjectsAnuKeys:
fiienulyName, kTitleKey,
"Connecteu Scannei", kExplainKey,
ueviceinfo, kviewContiolleiKey,
niljj;
_uevicecount++;
|self peifoimSelectoi0nNainThieau:selectoi(upuateview) with0bject:nil wait0ntilBone:N0j;
}
else {
0IAleitview *aleit=||0IAleitview allocj
initWithTitle:"Eiioi"
message:"0nable to open the scannei"
uelegate:self
cancelButtonTitle:"0K"
otheiButtonTitles:nilj;
|aleit showj;
|aleit ieleasej;
}

}


F7"F 84434 *3=1$
The list of eiioi coues is as follows:



B$5* _$H4*
@-=7DEB5775F@/>7
1L
@-=7DBCH@B:M:/K@
2L
@-=7D3@K:5KJ
SL
@-=7D-75CC3@K:5KJ
4L
@-=7D?H@B7@:
SL
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 156/183

@-=7DK/@HH/H
uL


@-=7D7@-7LB5C@:
-1L
@-=7DK/7@K/>JSF@F/HM
-2L
@-=7D>KB!C@?H@B7@C/?=
-SL
@-=7D>KB!C@C/?=
-4L
@-=7D>KB!C@>KC/?=
-SL
@-=7DC5-7@F37M
-6L
@-=7D>KB!C@?H@B7@@A@K7
-7L
@-=7D>KB!C@-@7@A@K7
-8L
@-=7D>KB!C@H@-@7@A@K7
-9L
@-=7D@A@K7K/7?H@B7@:
-1uL
@-=7D5KABC5:SBK:C@
-11L
@-=7D>KB!C@?H@B7@7SH@B:
-12L
@-=7D7SH@B:BCH@B:M?H@B7@:
-1SL
@-=7D7SH@B:-75CCH>KK5KJ
-14L
@-=7DK/7->33/H7@:
-1SL
@-=7D3@K:5KJ/3@HB75/KK/7?/F3C@7@:
-16L
@-=7DK/7L/>K:
-17L
@-=7D5KABC5:3BHBF@7@H
-18L
@-=7DK/75K575BC5T@:
-19L
@-=7D75F@/>7/>7/LHBKJ@
-2uL
@-=7D>KB!C@5K575BC5T@
-21L
@-=7D>KB!C@:@5K575BC5T@
-22L
@-=7D>K=K/EK?/KL5J>HB75/K
-2SL
@-=7D5KABC5:?/KL5J>HB75/K
-24L
@-=7DBCH@B:M@P5-75KJ
-2SL
@-=7D!>LL@H7//-FBCC
-26L
@-=7D>KB!C@/3@K:@A5?@
-27L
@-=7D>KB!C@?/KL5J>H@:@A5?@
-28L
@-=7D>KB!C@?/KA@H7-7H5KJ
-29L
@-=7D>KB!C@?/3M-7H5KJ
-SuL
@-=7D:@A5?@K/7/3@K
-S1L
@-=7DK/7BAB5CB!C@
-S2L
@-=7D>KB!C@EH57@L5C@
-SSL
@-=7D>KB!C@H@B:L5C@
-S4L
@-=7DEB57LB5C@:
-SSL
@-=7D5KABC5:?S@?=->F
-S6L
@-=7D?/FFBK::@K5@:
-S7L
@-=7D?/FF>K5?B75/K@HH/H
-S8L
@-=7DH@?@5A@>K@P3@?7@:?/FFBK:
-S9L
@-=7D>KB!C@?H@B7@J>5:
-4uL
@-=7D5KABC5:ABC>@
-41L
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 157/183
@-=7DH@U>@-775F@:/>7
-42L
@-=7D5KABC5:/3@HB75/K
-4SL
@-=7DEH/KJ3H/7/?/C
-44L
@-=7DU>@>@H@-@7@:
-4SL
@-=7D@P?@@:5KJF7>-5T@
-46L
@-=7DK/7S5KJ7/C5-7@K
-47L
@-=7D/>7:B7@:A@H-5/K
-48L


@-=7D>KB!C@H@J5-7@HL/HS5:?SBKJ@-
-SuL
@-=7D>KB!C@H@7H5@A@F@--BJ@
-S1L
@-=7D-MK7BP@HH/H
-S2L
@-=7D>KB!C@/3@KL5C@
-SSL
@-=7D>KB!C@H@7H5@A@3B7S
-S4L
@-=7D>KB!C@?H@B7@:5H@?7/HM
-SSL
@-=7D>KB!C@:@C@7@L5C@
-S6L
@-=7D>KB!C@:@C@7@:5H@?7/HM
-S7L


@-=7D>KB!C@H@B:F/:@F-7B7>-
-6uL
@-=7D>KB!C@J@7?CB--:@A5?@-
-61L
@-=7D>KB!C@J@7:@A5?@5K7@HLB?@
-62L
@-=7DL5C@K/7L/>K:
-6SL
@-=7DL5C@B??@--:@K5@:
-64L


@-=7D>KB!C@H@B:S5:5KL/
-7uL


@-=7D?/KLC5?73H/L5C@
-8uL
@-=7D:@C@7@?>HH@K73H/L5C@
-81L
@-=7D>KB!C@5K575BC5T@:B7B@:575KJ
-82L
@-=7D>K=K/EK:B7B@:575KJ/3@HB75/K
-8SL
@-=7D5K?/HH@?7K>F!@H/L3BHBF@7@H-
-84L
@-=7D5KABC5:L/HFB7
-8SL
@-=7D5KABC5:A@H-5/K
-86L


@-=7D/A@HCBMA5@EK/7-@7
-9uL


<.<SST
The eiioi coues aie uefineu in the SktScanEiiois.h file.

U$L$T
The eiioi coues aie uefineu in
com.SocketNobile.ScanAPI.SktScanEiiois.

<7T
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 158/183
The eiioi coues aie uefinieu in
ScanAPI.SktScanEiiois.

=FX*#6GL* <T
The eiioi coues aie uefineu in the SktScanEiiois.h file.

1] "Q5F3H3RG*K C%45*,$6G3%
This paiagiaph explains how the cuiient set of suppoiteu symbologies can be
enumeiateu fiom a connecteu scannei.

The symbology status has S states; enable, uisable anu not suppoiteu. The enable
state inuicates the uevice uoes suppoit this symbology anu it is active. The uisable
state inuicates the uevice uoes suppoit this symbology but it is ue-activateu. The
thiiu state, not suppoiteu, means this symbology is not suppoiteu by the uevice.

The symbology is iuentifieu in ScanAPI by a Symbology IB. The
kSktScanSymbologyLastSymbologyIB is actually not a symbology but insteau
inuicates the numbei total of symbologies suppoiteu in ScanAPI (this value coulu
change with uiffeient veisions).

A symbology status is ietiieveu by using the uet API with a
kSktScanPiopIuSymbologyBevice piopeity as uesciibeu in this uocument.

The symbology enumeiation begins by calling the uet API with the piopeity
initializeu to kSktScanSymbologyNotSpecifieu+1 to ietiieve the status of the fiist
symbology. The piopeity must then have its Symbology fielu set coiiectly with its IB
equal to the ietuineu symbology type, e.g. kSktScanSymbologyAustialiaPost if that
was the fiist symbology ietuineu.

When the application ieceives the uet complete message, it upuates the status foi
the symbology specifieu in the piopeity, anu it can then inciement the symbology iu
anu check if it is not equal to kSktScanSymbologyLastSymbologyIB. If it is then the
application is uone enumeiating the symbologies foi this uevice. If it is not equal
then the application can continue the symbology enumeiation by calling again
SktScanuet with this new symbology iu.

If the uet API ietuins a not suppoiteu eiioi (ESKT_N0TS0PP0RTEB) oi if the uet
Complete event ietuins the same eiioi, then this symbology is not suppoiteu by the
connecteu uevice, anu it is safe to move to the next symbology IB if it is uiffeient
fiom kSktScanSymbologyLastSymbologyIB.

This opeiation of enumeiating the symbologies of a uevice can be lengthy. It is
iecommenueu to use Symbology cache logic in conjunction with the Change IB
featuie. The cache is filleu the fiist time by enumeiating all of the symbologies of a
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 159/183
uevice, anu the Change IB is stoie in the cache as well. When the uevice ieconnects,
the application iequests the uevice Change IB anu compaies it with the one stoieu
in the local cache.

1; 2$6$ #3%+G,5$6G3% +*$64,*
The uata confiimation featuie allows an application to contiol how the uecoueu
uata is confiimeu.

This featuie is mostly useful when the opeiatoi is uistant fiom the host.

The confiimation can be geneiateu at thiee uiffeient levels: locally on the uevice,
iemotely on the host by ScanAPI, oi iemotely on the host by the application
itself.

The uefault setting is uata confiimation is uone locally in the uevice.

The local acknowleugement action (beep, iumble, leu flash) can be mouifieu by
using the piopeity kSktScanPiopIuLocalBecoueActionBevice. Please iefei to this
piopeity foi moie uetails.

In oiuei to inuicate to ScanAPI at which level the uata confiimation shoulu be
uone, the kSktScanPiopIuBataConfiimationNoue shoulu be set with its byte
value set to the appiopiiate value. If the choice is to have eithei ScanAPI oi the
uevice to confiim the uecoueu uata, theie is anothei piopeity that neeus to be
useu in oiuei to specify what action shoulu be maue when ScanAPI oi the uevice
confiims the uata. An action is a combination of beep, LEB flashing anu Rumble.

If the application is the level chosen foi confiiming uata, the application neeus to
senu a confiimation by uoing a piopeity set opeiation with the piopeity IB set
to kSktScanPiopIuBataConfiimationBevice, with the confiimation action
specifieu.

Steps foi a uata confiimation locally at the uevice:
1- Configuie the uevice local confiimation action by using the
kSktScanPiopIuLocalBecoueActionBevice.
2- Configuie ScanAPI to inuicate the uevice is confiiming the uata locally by
using the kSktScanPiopIuBataConfiimationNoue with its byte value set to
kSktScanBataConfiimationNoueBevice

Steps foi a uata confiimation at ScanAPI level
1- Configuie ScanAPI confiimation action by using the
kSktScanPiopIuBataConfiimationAction.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 160/183
2- Configuie ScanAPI to inuicate it shoulu confiim the uata by using the
kSktScanPiopIuBataConfiimationNoue with its byte value set to
kSktScanBataConfiimationNoueScanAPI.

Steps foi a uata confiimation at the Application level
1- Configuie ScanAPI to inuicate the application is uoing the uata confiimation
by using the kSktScanPiopIuBataConfiimationNoue with its byte value set to
kSktScanBataConfiimationNoueApp.
2- Confiim the uata by using the kSktScanPiopIuBataConfiimationBevice with
the appiopiiate action the uevice shoulu peifoim. In this case the action can
inuicate if the uecoueu uata was what the application expecteu, oi, if the uata
uiun't match with what the application is expecting.

/0 "$5OH* W$%NHG%R $KQ%#W,3%34K *L*%6K 3+ "#$%&'(

In most cases, the application using ScanAPI has some soit of 0I. Since ScanAPI is
baseu on asynchionous API, it fits veiy well in an aichitectuie that has some 0I
involveu.

0sually theie is no neeu to cieate anothei thieau othei than the one that is alieauy
useu foi the 0I.

0ne of the appioaches coulu be to use a simple timei. The timei hanulei calls the
Wait API with no timeout, anu if a Scan0bject is available it can be acteu upon in this
hanulei.

Beie aie the basic steps an application can follow in oiuei to use ScanAPI:

1) 0pen the ScanAPI object by using 0pen API with N0LL as the uevice name.
2) If the open is successful then a timei can be staiteu.
S) The timei hanulei calls the Wait API to ieceive asynchionous events coming
fiom ScanAPI object.
4) If a Scan0bject is ieceiveu in the timei hanulei, a switch case statement on the
Nsg IB of the Scan0bject can be useu to uispatch to an appiopiiate sub hanulei.
S) If the Teiminate event is ieceiveu, it means the timei can be safely teiminateu,
anu the ScanAPI object can be closeu.


Beie is what the CC++ coue might look like:
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 161/183
The main windproc message handler can have these 2 entries:

// on create of the window
case WM_CREATE:
{
Global.hWnd=hWnd;
SKTRESULT Result=SktScanOpen(NULL,&Global.hScanAPI);
if(!SKTSUCCESS(Result))
DisplayError("Unable to Open ScanAPI:%d",Result);
else
{
// start the timer to consume ScanAPI ScanObject
SetTimer(hWnd,TIMER_ID,200,NULL);
}
}
break;
case WM_TIMER:
TimerHandler();
break;





void TimerHandler()
{
TSktScanObject* pScanObj=NULL;
bool bTerminate=false;
SKTRESULT Result=SktScanWait(Global.hScanAPI,&pScanObj,100);
if(SKTSUCCESS(Result))
{
if(Result==ESKT_NOERROR)
{
switch(pScanObj->Msg.MsgID)
{
case kSktScanMsgIdDeviceArrival:
HandleDeviceArrival(pScanObj);
break;
case kSktScanMsgIdDeviceRemoval:
HandleDeviceRemoval(pScanObj);
break;
case kSktScanMsgEvent:
HandleAsynchronousEvent(pScanObj);
break;
case kSktScanMsgGetComplete:
HandleGetComplete(pScanObj);
break;
case kSktScanMsgSetComplete:
HandleSetComplete(pScanObj);
break;
case kSktScanMsgIdTerminate:
KillTimer(Global.hWnd,TIMER_ID);// stop the timer
bTerminate=true;// terminate this application
break;
}
SktScanRelease(Global.hScanAPI,pScanObj);
if(bTerminate==true)
{
SktScanClose(Global.hScanAPI);
Global.hScanAPI=NULL;
PostMessage(Global.hWnd,WM_CLOSE,0,0);// close this application
}
}
}
}




Socket ScanAPI Reference
2014 Socket Mobile, Inc. 162/183

The hanulei functions can be coueu as:


SKTRES0LT
BanuleBeviceAiiival(
IN TSktScan0bject* pScan0bj
}
{
SKRES0LT Result=ESKT_N0ERR0R;
SKTBANBLE hBevice=N0LL;

open the scannei
Result=SktScan0pen(pScan0bj->Bevice.uuiu,&hBevice);

if the scannei is successfully open, then
stoie its info into the application
scannei list
if(SKTS0CCESS(Result))
{
Result=AuuScannei(pScan0bj->Bevice.szBeviceName,hBevice);
}
ietuin Result;
}

SKTRES0LT
BanuleBeviceRemoval(
IN TSktScan0bject* pScan0bj
}
{
SKRES0LT Result=ESKT_N0ERR0R;
SKTBANBLE hBevice=pScan0bj->Bevice.hBevice;

close the scannei
Result=SktScanClose(hBevice);

if the scannei is successfully closeu,
then iemove its info fiom the
application scannei list
if(SKTS0CCESS(Result))
{
Result=RemoveScannei(hBevice);
}
ietuin Result;
}

SKTRES0LT
BanuleSetComplete(
IN TSktScan0bject* pScan0bj
)
{
SKTRES0LT Result=ESKT_N0ERR0R;
Result=pScan0bj->Nsg.Result;
if(SKTS0CCESS(Result))
{
0puate0I();
}
ietuin Result;
}

SKTRES0LT
BanuleuetComplete(
IN TSktScan0bject* pScan0bj
)
{
SKTRES0LT Result=ESKT_N0ERR0R;
SKTBANBLE hBevice=N0LL;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 163/183

ietiieve the Result
Result=pScan0bj->Nsg.Result;
ietiieve the uevice hanule
hBevice=pScan0bj->Nsg.Bevice.hBevice;
if(SKTS0CCESS(Result))
{
switch(pScan0bj->Piopeity.IB)
{
we caie only about iefieshing the uevice
fiienuly name
case kSktScanPiopIuFiienulyNameBevice:
0puateFiienulyName(hBevice,pScan0bj->Piopeity.Stiing.pvalue);
bieak;
}
}
else
{
BisplayEiioi(_T("Eiioi %u uuiing uet opeiation foi %u"),
pScan0bj->Piopeity.IB);
}
ietuin Result;
}

SKTRES0LT
BanuleAsynchionousEvent(
IN TSktScan0bject* pScan0bj
)
{
SKTRES0LT Result=ESKT_N0ERR0R;
switch(pScan0bj->Nsg.Event.IB)
{
case kSktScanEventEiioi:
BisplayEiioi(_T("Receive eiioi %u"),
pScan0bj->Nsg.Result);
bieak;
case kSktScanEventBecoueuBata:
BisplayBata(
pScan0bj->Nsg.Event.Bata.BecoueuBata.Stiing.pvalue);
bieak;
case kSktScanEventLowBatteiy:
BisplayNessage(_T("Low Batteiy"));
case kSktScanEventButtons:
bieak;
uefault:
BisplayEiioi(_T("Receive unexpecteu Event!!!"));
}
ietuin Result;
}






Beie is a sample in }ava foi the BlackBeiiy platfoim.

G5O3,6 com.SocketNobile.ScanAPI.ISktScanApi;
G5O3,6 com.SocketNobile.ScanAPI.ISktScanBecoueuBata;
G5O3,6 com.SocketNobile.ScanAPI.ISktScanBevice;
G5O3,6 com.SocketNobile.ScanAPI.ISktScanEvent;
G5O3,6 com.SocketNobile.ScanAPI.ISktScanNsg;
G5O3,6 com.SocketNobile.ScanAPI.ISktScan0bject;
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 164/183
G5O3,6 com.SocketNobile.ScanAPI.ISktScanPiopeity;
G5O3,6 com.SocketNobile.ScanAPI.ISktScanSymbology;
G5O3,6 com.SocketNobile.ScanAPI.ISktScanveision;
G5O3,6 com.SocketNobile.ScanAPI.SktClassFactoiy;
G5O3,6 com.SocketNobile.ScanAPI.SktScan;
G5O3,6 com.SocketNobile.ScanAPI.SktScanEiiois;

O4FHG# #H$KK NyScanAPI *V6*%NK NainScieen{

O,GL$6* ISktScanApi _ScanApi=%4HH;
O,GL$6* Timei _scanApiConsumei=%4HH;
O,GL$6* ISktScan0bject|j_scan0bjReceiveu=%4HH;

O4FHG# NyScanAPI()
{
K4O*,();

_scanApiConsumei=%*M Timei();
_scan0bjReceiveu=%*M ISktScan0bject|1j;

Auu the scieen title
LabelFielu title=
%*M LabelFielu("Ny App",
LabelFielu.@CC53-5-LabelFielu.>-@DBCCDE5:7S);

setTitle(title);


open a ScanAPI object heie
_ScanApi=SktClassFactoiy.cieateScanApiInstance();
H3%R iesult=_scanAPI.0pen(%4HH);

_scanApiConsumei.scheuule(_ScanAPIConsumeiTimei, 1, 2uu);

}





**
* _ScanAPIConsumeiTimei
* This is a timei task that checks eveiy once a while
* if theie is a Scan0bject to ietiieve fiom ScanAPI
* anu it checks if theie is a commanu to senu
*
O,GL$6* TimeiTask _ScanAPIConsumeiTimei=%*M TimeiTask() {

O4FHG# L3GN iun() {
F33H*$% closeScanApi=false;
H3%R iesult=
_ScanApi.WaitFoiScan0bject(_scan0bjReceiveu,1);
G+(SktScanEiiois.-=7->??@--(iesult))
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 165/183
{
G+(iesult!=SktScanEiiois.@-=7DEB5775F@/>7)
{
closeScanApi=BanuleScan0bject(
_scan0bjReceiveu|uj);

_ScanApi.ReleaseScan0bject(
_scan0bjReceiveu|uj);
if(closeScanApi==tiue){
_ScanApi.Close();
_ScanApiConsumeiTimei.cancel();
}
}
else
{
if theie is a commanu to senu
now might be a goou time
senuNextCommanu();
}
}
}
};



**
* BanuleScan0bject
* This methou is calleu each time this application ieceives a
* Scan0bject fiom ScanAPI.
*
O,36*#6*N F33H*$% BanuleScan0bject(ISktScan0bject scan0bject) {
F33H*$% closeScanApi=false;
KMG6#W(scan0bject.getNessage().getIB())
{
#$K* ISktScanNsg.2-2%-*,.FG956:$;8*$B++8;,":
BanuleBeviceAiiival(scan0bject);
F,*$D;
#$K* ISktScanNsg.2-2%-*,.FG956:$;8*$H$I&;,":
BanuleBeviceRemoval(scan0bject);
F,*$D;
#$K* ISktScanNsg.2-2%-*,.FG9J$%?&I4"$%$:
#$K* ISktScanNsg.2-2%-*,.FG9-$%?&I4"$%$:
Bouet0iSetComplete(scan0bject);
F,*$D;
#$K* ISktScanNsg.2-2%-*,.FG9567$+I8.,%$:
closeScanApi=tiue;
F,*$D;
#$K* ISktScanNsg.2-2%-*,.FG9@;$.%:
BanuleEvent(scan0bject);
F,*$D;
}
,*64,% closeScanApi;
}

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 166/183

/1 "D6"#$%&'(=M%*,KWGO Y$L$GH$FH* +3, U$L$ OH$6+3,5KZ

Since ScanAPI is single client, meaning only one client application can use ScanAPI at
a time; a SktScanApi0wneiship API has been auueu to help manage the ScanAPI
owneiship.

This API is available only on }ava platfoims (BlackBeiiy anu Anuioiu).

When an application neeus to use ScanAPI, it uses this SktScanApi0wneiship API to
fiist ask foi ScanAPI 0wneiship. If anothei application has alieauy the ScanAPI
owneiship, it ieceives a callback asking to ielease this owneiship. 0nce this ielease
of owneiship is completeu, the application iequesting it, ieceives a callback
inuicating the owneiship has been ieleaseu anu it is now safe foi this application to
claim it.
0nce an application is uone using ScanAPI, it closes it anu then ieleases its
owneiship causing any othei application to be notifieu with a SktScanApi0wneiship
callback that the ScanAPI owneiship has been ieleaseu anu can be ie-claimeu.

Why it is impoitant to use this SktScanApi0wneiship API If youi application woiks
with othei Socket applications such as SocketScan 1u Keyboaiu weuge, Scannei
Settings oi Socket EZ Paii, then this API will pievent any conflict using ScanAPI as
they all use the same SktScanApi0wneiship API.

The typical usage of SktScanApi0wneiship woulu be the following:
1) At the application staitup, the application constiucts the
SktScanApi0wneiship object, by giving a notification hanulei anu its
name.
2) The application asks foi the ScanAPI owneiship anu wait foi a
iesponse in the SktScanApi0wneiship callback.
S) When the iesponse is ieceive in the ScanApi0wneiship callback, the
application claims the ScanAPI owneiship anu opens ScanAPI.
4) When anothei application asks foi ScanAPI owneiship, this cuiient
application ieceives thiough its ScanApi0wneiship notification
hanulei an inuication it has to close ScanAPI.
S) When ScanAPI is fully closeu, this application then ieleases the
ScanAPI owneiship causing the othei application to ieceive a
ScanApi0wneiship inuicating that the owneiship has been ieleaseu
anu theiefoie it is safe foi this application to claim it.
6) When this othei application is uone using ScanAPI, it closes ScanAPI
anu ieleases its owneiship, which causes this cuiient application to
ieceive a notification inuicating it can claim ScanAPI owneiship anu
ieopen it again.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 167/183
7) When the application is shutting uown, it closes ScanAPI anu it
ieleases ScanAPI owneiship, uniegisteis fiom ScanAPI owneiship.



GF"F J3&$24A*234
The ScanAPI0wneiship object constiuctoi iequiies the name of the application anu
the notification inteiface implementation to ieceive the notification fiom ScanAPI
owneiship change.
/1J1J1 "Q%6$V
<.<SST
Not available

U$L$T
SktScanApi0wneiship(
Notification notification,
Stiing applicationName
);

notification
|inj the implementation of the SktScanApi0wneiship notification inteiface.
This paiametei cannot be null.

applicationName
|inj the name of the application. This is to iuentify what application is taking
oi ieleasing the ScanAPI owneiship.

<7T
Not available.

=FX*#6GL* <T
Not available.

/1J1J/ )*64,% L$H4*
none
/1J1J: )*5$,DK
The application won't ieceive any ScanAPI owneiship change notification until it
calls the iegistei methou of this class.
/1J1J- CV$5OH*
<.<SST
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 168/183
Not available.

U$L$T

cieate a ScanAPI owneiship
_scanApi0wneiship=%*M SktScanApi0wneiship(_scanApi0wneishipNotification,
getStiing(R.stiing.G*,..$+G$%%8.9GD,44D.,I$));

<7T
Not available.

=FX*#6GL* <T
Not available.
/1J1JP ^4%#6G3% G%+3,5$6G3%

<.<SS
Beauei Not available
Impoit libiaiy Not available
Ninimum opeiating systems Not available
U$L$
Impoit com.SocketNobile.ScanAPI.SktScanApi0wneiship
}ai File ScanAPIFactoiy.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
<7
Refeience Not available
Ninimum opeiating system Not available
=FX*#6GL* <
Impoit Not available
Fiamewoik Not available
Ninimum opeiating system Not available


GF"G 41'%$214
The iegistei methou of SktScanApi0wneiship class allows the application to iegistei
foi ieceiving notification about a change in ScanAPI owneiship.
/1J/J1 "Q%6$V
<.<SST
Not available

U$L$T

Foi BlackBeiiy platfoim:
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 169/183
int iegistei(
Application context
);


Foi Anuioiu platfoim:
int iegistei(
Context context
);

context
|inj iefeience to the application context, useu foi hooking the notification
hanulei to the application.
<7T
Not available.

=FX*#6GL* <T
Not available.
/1J/J/ )*64,% L$H4*
SktScanApi0wneiship.Eiioi.kInvaliuContext if the context passeu as input
paiametei is null, oi SktScanApi0wneiship.Eiioi.kNoEiioi in case of success.
/1J/J: )*5$,DK
This methou installs the notification hanulei, anu makes the application awaie of
any change in ScanAPI owneiship. The uniegistei methou must be calleu when the
application is uone with ScanAPI otheiwise a memoiy leak might occui.
/1J/J- CV$5OH*
**
* iegistei foi ScanAPI owneiship
*
O,GL$6* L3GN iegisteiScanApi0wneiship(){
_scanApi0wneiship.iegistei(6WGK);
}



/1J/JP ^4%#6G3% G%+3,5$6G3%

<.<SS
Beauei Not available
Impoit libiaiy Not available
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 170/183




GF"H A&41'%$214
The uniegistei methou of SktScanApi0wneiship class allows an application to
uniegistei the notification about a change in ScanAPI owneiship.
/1J:J1 "Q%6$V
<.<SST
Not available

U$L$T
voiu uniegistei();

<7T
Not available.

=FX*#6GL* <T
Not available.
/1J:J/ )*64,% L$H4*
No ietuin value foi this methou.
/1J:J: )*5$,DK
This methou uninstalls the ScanAPI 0wneiship notification application hanulei.
0nce this methou is calleu the application won't ieceive any notification about
change in ScanAPI owneiship.

If the application iegisteis foi notification, the uniegistei methou must be calleu
when the application is uone using ScanAPI in oiuei to avoiu a memoiy leak.
Ninimum opeiating systems Not available
U$L$
Impoit com.SocketNobile.ScanAPI.SktScanApi0wneiship
}ai File ScanAPIFactoiy.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
C#
Refeience Not available
Ninimum opeiating systems Not available
0bjective C
Impoit Not available
Fiamewoik Not available
Ninimum opeiating system Not available
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 171/183
/1J:J- CV$5OH*
**
* uniegistei fiom ScanAPI owneiship
*
O,GL$6* L3GN uniegisteiScanApi0wneiship(){
_scanApi0wneiship.uniegistei();
}


/1J:JP ^4%#6G3% G%+3,5$6G3%
<.<SS
Beauei Not available
Impoit libiaiy Not available
Ninimum opeiating systems Not available
U$L$
Impoit com.SocketNobile.ScanAPI.SktScanApi0wneiship
}ai File ScanAPIFactoiy.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
<7
Refeience Not available
Ninimum opeiating system Not available
=FX*#6GL* <
Impoit Not available
Fiamewoik Not available
Ninimum opeiating system Not available

GF"! +$XZ34I^&14$@%5
This method asks for ScanAPI ownership. This method is usually called when an
application needs to use ScanAPI and it doesnt have already its ownership.
When the request is honored the ScanApiOwnership callback is called with released flag
set to false. At this point the application can safely claim the ScanAPI ownership by
using the claimOwnership API.
21.4.1 Syntax
C/C++:
Not available.

Java:
int askForOwnership();

C#:
Not available.

Objective C:
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 172/183
Not available.

21.4.2 Return value
SktScanApi0wneiship.Eiioi.kInvaliuContext if the context passeu as input
paiametei is null, oi SktScanApi0wneiship.Eiioi.kNoEiioi in case of success.
21.4.3 Function information

C/C++
Header Not available
Imported library Not available
Minimum operating system Not available
Java
Import com.SocketMobile.ScanAPI.ScanApiOwnership
Jar File ScanApiFactory.jar
Minimum operating system RIM 5.0.0 or Android 2.1
C#
Reference Not available
Minimum operating system Not available
Objective C
Import Not available
Framework Not available
Minimum operating system Not available


GF"E *;+%:I^&14$@%5
This methou claims the ScanAPI owneiship. This methou is usually calleu just befoie
opening ScanAPI. The iecommenueu way of calling this methou is uiiectly in the
ScanApi0wneiship notification, when the ieleaseu flag is set to false.
/1JPJ1 "Q%6$V
<.<SST
Not available

U$L$T
int claim0wneiship();

<7T
Not available.

=FX*#6GL* <T
Not available.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 173/183
/1JPJ/ )*64,% L$H4*
This methou ietuins SktScanApi0wneiship.Eiioi.kNotRegisteieu if the application
hasn't iegisteieu befoie calling this methou, oi
SktScanApi0wneiship.Eiioi.kNoEiioi in case of success.
/1JPJ: )*5$,DK

When an application ieceives a ScanAPI owneiship notification inuicating it can now
take the owneiship of ScanAPI, it must call this methou in oiuei to claim the
ScanAPI owneiship piioi opening ScanAPI.
/1JPJ- CV$5OH*
**
* open ScanAPI by fiist claiming its owneiship
* then checking if the pievious instance of ScanAPI has
* been coiiectly close. ScanAPI initialization is uone in a
* sepaiate thieau, because it peifoims some inteinal testing
* that iequiies some time to complete anu we want the 0I to be
* iesponsive anu piesent on the scieen uuiing that time.
*
O,GL$6* L3GN openScanApi(){
_scanApi0wneiship.claim0wneiship();
check this event to be suie the pievious
ScanAPI consumei has been shutuown
Bebug.F-J(Bebug.2C$;$"7+,*$,"Wait foi the pievious teiminate event to be set");

G+(_consumeiTeiminateuEvent.waitFoi(Suuu)==6,4*){
Bebug.F-J(Bebug.2C$;$"7+,*$,"the pievious teiminate event has been
set");
_consumeiTeiminateuEvent.ieset();
_scanApiBelpei.iemoveCommanus(%4HH); iemove all the commanus
_scanApiBelpei.open();
}
*HK*{
Bebug.F-J(Bebug.2C$;$"7+,*$,"the pievious teiminate event has N0T been
set");
Intent intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
intent.putExtia(@P7HBD@HH/HDF@--BJ@,"0nable to stait ScanAPI because
the pievious close hasn't been completeu. Restait this application.");
senuBioaucast(intent);
}
}


/1JPJP ^4%#6G3% G%+3,5$6G3%
<.<SS
Beauei Not available
Impoit libiaiy Not available
Ninimum opeiating systems Not available
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 174/183
U$L$
Impoit com.SocketNobile.ScanAPI.SktScanApi0wneiship
}ai File ScanAPIFactoiy.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
<7
Refeience Not available
Ninimum opeiating system Not available
=FX*#6GL* <
Impoit Not available
Fiamewoik Not available
Ninimum opeiating system Not available

GF"/ 41;1+$1I^&14$@%5
This methou ieleases the ScanAPI owneiship. This methou is usually calleu when
the application is closing ScanAPI.
/1J8J1 "Q%6$V
<.<SST
Not available

U$L$T
int ielease0wneiship();

<7T
Not available.

=FX*#6GL* <T
Not available.
/1J8J/ )*64,% L$H4*
This methou will ietuin SktScanApi0wneiship.Eiioi.kNotRegisteieu if the
application hasn't iegisteieu piioi calling this methou, oi
SktScanApi0wneiship.Eiioi.kNoEiioi in case of success.
/1J8J: )*5$,DK
This function must be calleu when the application is closing ScanAPI. This will
inuicate the othei ScanAPI application the owneiship can be taken anu ScanAPI can
be useu.

When the application ieceives a ScanAPI owneiship notification asking the
application to close ScanAPI, it must call this function in oiuei to ieally ielease the
owneiship coiiectly.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 175/183
/1J8J- CV$5OH*
**
* close ScanAPI by fiist ieleasing its owneiship anu
* by senuing an aboit. This allows ScanAPI to shutuown
* giacefully by asking to close any Scannei 0bject if
* they weie openeu. When ScanAPI is uone a kSktScanTeiminate event
* is ieceiveu in the Scan0bject consumei timei thieau.
*
O,GL$6* L3GN closeScanApi(){
_scanApiBelpei.close();
_scanApi0wneiship.ielease0wneiship();
}


/1J8JP ^4%#6G3% G%+3,5$6G3%
<.<SS
Beauei Not available
Impoit libiaiy Not available
Ninimum opeiating systems Not available
U$L$
Impoit com.SocketNobile.ScanAPI.SktScanApi0wneiship
}ai File ScanAPIFactoiy.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
<7
Refeience Not available
Ninimum opeiating system Not available
=FX*#6GL* <
Impoit Not available
Fiamewoik Not available
Ninimum opeiating system Not available

GF"7 M32%<%*+2%3& 3&)*+&,5%I^&14$@%5J@+&'1
The ScanAPI0wneiship class iequiies a notification inteiface implementation as
pait of its constiuctoi input vaiiable.
This inteiface has only one function calleu each time theie is a ScanAPI owneiship
change. A Boolean calleu +$"$,G$ inuicates what to uo with the cuiient ScanAPI
owneiship.
If the Boolean +$"$,G$ is set to tiue, then the application has to ielease the ScanAPI
owneiship anu close ScanAPI. If this Boolean is false then the application can take
the ScanAPI owneiship by calling the claim0wneiship methou anu then can open
ScanAPI.

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 176/183
/1JaJ1 "Q%6$V
<.<SST
Not available.

U$L$T

Foi BlackBeiiy platfoims:
voiu onScanApi0wneishipChange(
Application context,
boolean ielease
);

Foi Anuioiu platfoims:
voiu onScanApi0wneishipChange(
Context context,
boolean ielease
);

context:
|inj context of the application. This is the same iefeience as passeu in the
iegistei methou.
ielease:
|inj If this Boolean is tiue then the owneiship has to be ieleaseu anu ScanAPI
has to be closeu. If it is false, then the ScanAPI owneiship can be claimeu anu
ScanAPI can be openeu.

<7T
Not available.

=FX*#6GL* <T
Not available.
/1JaJ/ )*64,% L$H4*
No ietuin value.
/1JaJ: )*5$,DK
As soon as the application has iegisteieu foi ScanAPI owneiship, this notification
can be calleu.
This methou is calleu by the SktScanApi0wneiship class as callback, anu it shoulu
not be invokeu in the application coue.
/1JaJ- CV$5OH*

**
* Notification helping to manage ScanAPI owneiship.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 177/183
* 0nly one application at a time can have access to ScanAPI.
* When anothei application is claiming ScanAPI owneiship, this
* callback is calleu with ielease set to tiue asking this application
* to ielease scanAPI. When the othei application is uone with ScanAPI
* it calls ielease0wneiship, causing this callback to be calleu again
* but this time with ielease set to false. At that moment this application
* can ieclaim the ScanAPI owneiship.
*
O,GL$6* Notification _scanApi0wneishipNotification=%*M Notification() {

O4FHG# L3GN onScanApi0wneishipChange(Context context, F33H*$% ielease)
{
G+(ielease==6,4*){
closeScanApi();
}
*HK*{
openScanApi();
}
}
};

**
* open ScanAPI by fiist claiming its owneiship
* then checking if the pievious instance of ScanAPI has
* been coiiectly close. ScanAPI initialization is uone in a
* sepaiate thieau, because it peifoims some inteinal testing
* that iequiies some time to complete anu we want the 0I to be
* iesponsive anu piesent on the scieen uuiing that time.
*
O,GL$6* L3GN openScanApi(){
_scanApi0wneiship.claim0wneiship();
check this event to be suie the pievious
ScanAPI consumei has been shutuown
Bebug.F-J(Bebug.2C$;$"7+,*$,"Wait foi the pievious teiminate event to be set");

G+(_consumeiTeiminateuEvent.waitFoi(Suuu)==6,4*){
Bebug.F-J(Bebug.2C$;$"7+,*$,"the pievious teiminate event has been set");
_consumeiTeiminateuEvent.ieset();
_scanApiBelpei.iemoveCommanus(%4HH); iemove all the commanus
_scanApiBelpei.open();
}
*HK*{
Bebug.F-J(Bebug.2C$;$"7+,*$,"the pievious teiminate event has N0T been set");
Intent intent=%*M Intent(K/75LMD@HH/HDF@--BJ@);
intent.putExtia(@P7HBD@HH/HDF@--BJ@,"0nable to stait ScanAPI because
the pievious close hasn't been completeu. Restait this application.");
senuBioaucast(intent);
}
}

**
* close ScanAPI by fiist ieleasing its owneiship anu
* by senuing an aboit. This allows ScanAPI to shutuown
* giacefully by asking to close any Scannei 0bject if
* they weie openeu. When ScanAPI is uone a kSktScanTeiminate event
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 178/183
* is ieceiveu in the Scan0bject consumei timei thieau.
*
O,GL$6* L3GN closeScanApi(){
_scanApiBelpei.close();
_scanApi0wneiship.ielease0wneiship();
}



/1JaJP ^4%#6G3% G%+3,5$6G3%

<.<SS
Beauei Not available
Impoit libiaiy Not available
Ninimum opeiating systems Not available
U$L$
Impoit com.SocketNobile.ScanAPI.SktScanApi0wneiship
}ai File ScanAPIFactoiy.jai
Ninimum opeiating system RIN S.u.u, Anuioiu 2.1
<7
Refeience Not available
Ninimum opeiating system Not available
=FX*#6GL* <
Impoit Not available
Fiamewoik Not available
Ninimum opeiating system Not available






22 SoftScan feature
SoftScan is a scannei function that is using the host cameia to uecoue a baicoue.
This featuie is available only on i0S anu Anuioiu platfoims, iunning on uevices that
uo have a cameia.

22.1 Usage
ScanAPI pioviues a piopeity to enable oi uisable this featuie. If the SoftScan featuie
is enableu, a uevice aiiival event is fiieu assuming the host uevice has the necessaiy
haiuwaie to suppoit this featuie.
The application can then open the uevice as any othei Socket Nobile coiuless
scannei, enable oi uisable the available symbologies, ieau oi change the fiienuly
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 179/183
name, anu tiiggei a scan by using the tiiggei piopeity. As with the othei Socket
Nobile scanneis, the piopeities that aien't suppoiteu by SoftScan simply ietuins a
"N0T S0PP0RTEB" eiioi.
When the SoftScan featuie is no longei neeueu, the application can at any time,
uisable it by using the ScanAPI piopeity kSktScanPiopIuSoftScanStatus. ScanAPI
geneiates a uevice iemoval event inuicating the SoftScan uevice is no longei
available. This setting is peisistent acioss the application life cycle.

22.2 iOS integration.
There are 2 versions of ScanAPI library. libScanAPI.a that doesnt include the SoftScan
feature, and libScanAPIRedLaser.a that does include the SoftScan feature with the help
of the RedLaser SDK.

ScanAPI pioviues a cameia oveilay view to help the aiming of the cameio onto the
baicoue. This oveilay is active as soon as the tiiggei staits.

The SoftScan featuie is implementeu using the ReuLasei SBK fiom eBay. If the
application uoesn't have a piopei license fiom ReuLasei, only 2S scans will be
available, befoie the SoftScan featuie becomes uisableu anu not suppoiteu.
The ReuLasei license can be puichase uiiectly fiom ReuLasei with the necessaiy
application infoimation. This license file must be bunuleu to the application using
ScanAPI SoftScan featuie.
A wav file is also iequiieu in the application that is useu each time a successful scan
occuis. The ReuLasei neeus a ceitain numbei of fiamewoiks to be auueu to the
application pioject.

Beie is the list of files to incluue in youi application pioject:

-Copy Bunule Resouices section
ReuLasei_License.xml
Beep.wav

-Link binaiy with Libiaiies section
libScanAPIReuLasei.a
QuaitzCoie.fiamewoik
Coieviueo.fiamewoik
CoieNeuia.fiamewoik
Coieuiaphics.fiamewoik
AvFounuation.fiamewoik
0penuLES.fiamewoik
Secuiity.fiamewoik
libiconv.uylib
libstuc++.uylib

Socket ScanAPI Reference
2014 Socket Mobile, Inc. 180/183

22.3 Android integration

ScanAPI offeis automatically the SoftScan featuie when the application is linkeu
with a SoftScan engine such as ReuLasei.

By uefault ScanAPI configuiation is set to not suppoit this featuie. If an application
is linkeu with ReuLasei libiaiy anu has the appiopiiate ReuLasei license file in
place, it can set the SoftScan piopeity to tell ScanAPI that it is suppoiteu. This is
accomplisheu by using the kSktScanPiopIuSoftScanStatus piopeity. Please iefei to
this piopeity in the Piopeities paiagiaph of this uocumentation.

The application neeus the ReuLasei SBK, but only the jai files neeus to be copieu
unuei the libs uiiectoiy of the application. Theie is not neeu to call any ReuLasei
API. The ReuLasei license file shoulu be placeu in the assets foluei of the application
pioject.

Since SoftScan is using the uevice cameia, the cameia peimission shoulu be incluueu
in the application manifest file: anuioiu.peimission.CANERA.


Foi moie infoimation about the ReuLasei engine, please iefeie to the ReuLasei
uevelopei site: http:ieulasei.comuevelopeis .

If the softscan featuie is configuieu as not suppoiteu, it can't be changeu to enable
oi uisable until the featuie is configuieu as suppoiteu fiist. 0nce this featuie is
configuieu as suppoiteu, then it can be enableu oi uisableu causing iespectively a
uevice aiiival oi uevice iemoval to occui.

To make this featuie not suppoiteu again, SoftScan must be fiist set to uisableu anu
then it can be changeu to not suppoiteu.

23 History
)*LGKG3% A$FH*

2$6* 2*K#,GO6G3%
4292u11 Fiist ielease suppoiting Winuows (big anu WinNo), Anuioiu anu
BlackBeiiy
6162u11 Auueu i0S uetails
9162u11 ScanApiBelpei suppoit foi i0S, new Eiioi coue
ESKT_00TBATEBvERSI0N
1u192u11 Auueu moie infoimation about xCoue integiation
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 181/183
11u42u11 Auueu Recommenuations chaptei
12u22u11 Auuing moie infoimation iegaiuing Anuioiu peimissions in
Recommenuations foi Anuioiu.
u1u62u12 Re-oiueieu the paiagiaph, iewoiueu the Concept paiagiaph, anu
mouifieu the IBE integiation foi Xcoue.
u6192u12 Auuing the piopeities, anu the uesciiption of the SoftScan featuie.
u9192u12 Auuing the missing symbology ius (0SPS Intel. anu BPN).
12u62u12 Auuing the Anuioiu peimission
android.permission.BLUETOOTH_ADMIN that is required.
u11S2u1S Auueu new statistical countei names
u1182u1S Auueu 2 new eiioi coues foi ueteimining why a C0N poit can't be
openeu
u22S2u1S Ninoi euitoiial upuates baseu on feeuback
uS292u1S 0puate kSktScanPiopIuTimeisBevice
u6uS2u1S 0puate the fiamewoik iequiiements foi i0S ScanAPI ReuLasei
u6S2u1S Coiiect all enuian iefeiences to big-enuian'
u6u62u1S Auu the Suppoiteu anu Not Suppoiteu piopeity values foi SoftScan
Status piopeity.
6142u1S few giamatical upuates (woiu ietiieve) anu auu note why we use
vS2uu8.
6182u1S Auueu C# ScanAPI Belpei souice example, giammatical upuates
71u2u1S Auueu a line in Bata Confiimation paiagiaph about local uecoue action
7182u1S Auueu Bata Euiting
822u1S Auueu new Statistic value names foi 8Ci, coiiect font in statistics name
list
8S2u1S Auueu Specific Scannei Configuiations
8122u1S Fixeu iefeiences to Bata Confiimation anu auueu claiification foi
kSktScanSounuActionTypeBauScanLocal, fix typo auu 8Ci uevice type
81S2u1S 0puate minmax foi Beep Buiation anu Pause text
9S2u1S Auueu text foi ESKT_ RECEIVEUNEXPECTEDCOMMAND, update error
return for BADSCANLOCAL
9182u1S Auueu BeviceSpecific commanu foi 0PCA tiansmission foimat
1u222u1S Auueu uefines foi No Listenei' u0IB {11B47FS6-BE62-4u28-9177-
89F1BFSBBB4B}
u1Su2u14 0puateu AuaptiveScanning anu ScanAngle to iefei only to Lasei
scanneis, upuateu 7X to 7XiQi.
S142u14 Euitoiial fixes
S292u14 Auueu I2ofS length values foi kSktScanPiopIuBeviceSpecific
412u14 Fix iefeience to kSktScanSoundActionTypeGoodScanLocal
492u14 Auueu BanXin symbology
41S2u14 Claiifieu statistics table
4162u14 Auuing new 0veilay view piopeity paiameteis foi i0S Soft Scannei,
uiammatical cleanups of uataeuiting text.
42S2u14 0puate the iequiiements foi i0S matching to the new Soft Scannei.
Socket ScanAPI Reference
2014 Socket Mobile, Inc. 182/183
S12u14 Auuing the ESKT_0vERLAYvIEWN0TSET eiioi anu a paiagiaph about
it in the kSktScanPiopIuTiiggeiBevice uesciiption.


Socket ScanAPI Reference
2014 Socket Mobile, Inc. 183/183

You might also like