Download Print this page

Android Requirements; Concept; Scanapi Object - Socket ScanAPI Reference Manual

Advertisement

Socket ScanAPI Reference
-
Security.framework,
-
libiconv.dylib,
-
libstdc++.dylib or libstd++6.0.9.dylib if you're using OS6.x SDK.

3.3 Android requirements

The overlay view is a requirement for the SoftScanner in order to display the video
output in the application. This is implemented through an Activity that must be
added to the application manifest. This activity is defined as
com.SocketMobile.ScanAPI.SoftScanActivity.
The manifest should also have the following permissions:
-
android.permission.CAMERA,
-
android.permission.ACCESS_NETWORK_STATE
-
android.permission.INTERNET
A specific layout should be created that will be displayed as the overlay view of the
SoftScan. This layout can have a white rectangle that is called a "View Finder" that is
used as a scanning guide but also is use by the softscan scanner to improve the
barcode recognition in this region. The "View Finder" ID can be passed in the hash
table of the kSktScanPropIdOverlayViewDevice property. A flash button can be
added as well and its ID should be also specified in the same hash table of the same
property. If the flash feature is not available the SoftScan scanner will disable it
automatically.
The RedLaser libraries must be added to the Android application. The simplest way
for doing this is to copy the redlasersdk.jar and the armeabi/libredlaser.so in the
"libs" directory of the Android application. That "libs" subdirectory is automatically
taking in consideration by Android Development tools (ADT 18 or higher).

4 Concept

This API defines 3 main objects: ScanAPI object, Device object and ScanObject.

4.1 ScanAPI object

This object controls the API.
In order to use ScanAPI, this object must be opened first and this first open
initializes ScanAPI. The handle returned from this open must be used for any
subsequent ScanAPI operations.
All asynchronous events are received through this ScanAPI object.
© 2013 Socket Mobile, Inc.
12/152

Advertisement

loading
Need help?

Need help?

Do you have a question about the ScanAPI and is the answer not in the manual?