Package com.digimarc.dms.readers
Class Manager
java.lang.Object
com.digimarc.dms.readers.Manager
The Manager class provides a set of utility methods for the SDK. The Manager is a singleton object created at SDK
startup. The methods are either static or can be accessed on the Manager object obtained via
getInstance()
.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the camera settings Knowledge Base (KB) rule name selected.Get the camera settings Knowledge Base (KB) version.static String
Gets a string description for a Reader error code.static String
Gets a string description for a Resolver error code.static Manager
Get an instance of the Manager object.getRecommendedCameraParameters
(int cameraId, Object parameters) This method looks up the device's camera within the SDK's camera KB and sets camera parameters that have been found to work well when reading Digimarc Barcodes and traditional barcodes.android.graphics.Point
getRecommendedResolution
(int cameraId) This method looks up the device's camera within the SDK's camera KB and returns the best that work well when reading Digimarc Barcodes and traditional barcodes.
-
Field Details
-
mLogger
public static final com.getkeepsafe.relinker.ReLinker.Logger mLogger
-
-
Method Details
-
getInstance
Get an instance of the Manager object.- Returns:
- Manager object
-
getRecommendedCameraParameters
This method looks up the device's camera within the SDK's camera KB and sets camera parameters that have been found to work well when reading Digimarc Barcodes and traditional barcodes.- Parameters:
cameraId
- The ID of the camera being used. In most cases this value should be 0.parameters
- The initial camera parameters. This can be retrieved by callingCamera.getParameters()
if you are implementing your own camera code.- Returns:
- A modified set of camera parameters. If you are implementing you own camera code then
these parameters should be applied to the camera by calling
Camera.setParameters(Camera.Parameters)
. If you are using the CameraHelper class then this is handled for you.
-
getRecommendedResolution
@NonNull public android.graphics.Point getRecommendedResolution(int cameraId) This method looks up the device's camera within the SDK's camera KB and returns the best that work well when reading Digimarc Barcodes and traditional barcodes.- Returns:
- Point recommended preview resolution
-
getSdkVersion
- Returns:
- The DMSSDK version in the form of MAJOR.MINOR.INTERNALNUMBER.
-
getCameraSettingsKBVersion
Get the camera settings Knowledge Base (KB) version. This function returns the version of the the camera settings Knowledge Base (KB) loaded by Manager. Applications that want to query the KB version may use this function after calling Manager.getRecommendedCameraParameters(). Use of this API is optional and for diagnostic reasons only.- Returns:
- The Knowledge Base version in the form of MAJOR.MINOR.INTERNALNUMBER.
-
getCameraSettingsKBCurrentRuleName
Get the camera settings Knowledge Base (KB) rule name selected.
This function returns the rule name that was selected from the camera settings Knowledge Base (KB) and used by the Manager. Applications that want to query the KB rule selected by Manager may use this function after calling Manager.getRecommendedCameraParameters(). Use of this API is optional and for diagnostic reasons only.
- Returns:
- The rule name selected by Manager.
-
getDescriptionForErrorCode
Gets a string description for a Resolver error code.- Parameters:
code
- An error code fromResolver.ResolveError
.- Returns:
- A string containing the error description.
-
getDescriptionForErrorCode
Gets a string description for a Reader error code.- Parameters:
code
- An error code fromBaseReader.ReaderError
.- Returns:
- A string containing the error description.
-