Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

ScRecognitionContext.h
Go to the documentation of this file.
1 
10 #ifndef SC_RECOGNITION_CONTEXT_H_
11 #define SC_RECOGNITION_CONTEXT_H_
12 
13 #include <Scandit/ScConfig.h>
14 #include <Scandit/ScCommon.h>
16 
17 #if SC_PLATFORM_ANDROID
18 #include <jni.h>
19 #endif
20 
21 #if defined(__cplusplus)
22 extern "C" {
23 #endif
24 
40 typedef struct ScOpaqueRecognitionContext ScRecognitionContext;
43 
49 typedef enum {
226 
235 
237 
244 typedef struct {
246  uint32_t frame_id;
248 
256 SC_EXPORT const char *
258 
259 
260 #if SC_PLATFORM_ANDROID || (defined(SC_GENERATE_DOCS) && SC_GENERATE_DOCS)
261 
281 SC_EXPORT ScRecognitionContext *
282 sc_recognition_context_new(const char *license_key, const char* writable_data_path,
283  JNIEnv *env, jobject activity, const char* device_name);
284 #endif
285 
286 #if SC_PLATFORM_IOS || (defined(SC_GENERATE_DOCS) && SC_GENERATE_DOCS)
287 
304 SC_EXPORT ScRecognitionContext *
305 sc_recognition_context_new(const char *license_key, const char* device_name);
306 #endif
307 
308 #if SC_PLATFORM_GENERIC || (defined(SC_GENERATE_DOCS) && SC_GENERATE_DOCS)
309 
335 SC_EXPORT ScRecognitionContext *
336 sc_recognition_context_new(const char *license_key,
337  const char *writable_data_path,
338  const char *device_name);
339 #endif
340 
350 
362 
391 SC_EXPORT void
393 
426 SC_EXPORT ScProcessFrameResult
428  const ScImageDescription *image_description,
429  const uint8_t *image_data);
430 
442 SC_EXPORT void
444 
460 SC_EXPORT void
462  float latitude, float longitude);
463 
464 #if (SC_PLATFORM_IOS && defined(__OBJC__) && __OBJC__) || (defined(SC_GENERATE_DOCS) && SC_GENERATE_DOCS)
465 #include <UIKit/UIKit.h>
466 
486 SC_EXPORT ScContextStatusFlag
488  UIImage *image);
489 
490 #endif
491 
492 #if defined(__cplusplus)
493 }
494 #endif
495 
496 #endif // SC_RECOGNITION_CONTEXT_H_
Image Description interface.
@ SC_RECOGNITION_CONTEXT_STATUS_INTERNAL_ERROR
The context encountered an internal error.
Definition: ScRecognitionContext.h:61
@ SC_RECOGNITION_CONTEXT_STATUS_INVALID_PLATFORM
The Scandit SDK license validation failed. Your license key does not include this platform....
Definition: ScRecognitionContext.h:132
void sc_recognition_context_release(ScRecognitionContext *context)
Decrease reference count of recognition context by one.
@ SC_RECOGNITION_CONTEXT_STATUS_UNLICENSED_FEATURE_END
Denotes the end of the enum range for unlicensed features.
Definition: ScRecognitionContext.h:234
void sc_recognition_context_retain(ScRecognitionContext *context)
Increase reference count of recognition context by one.
Result status and frame id.
Definition: ScRecognitionContext.h:244
@ SC_RECOGNITION_CONTEXT_STATUS_TIME_EXCEEDED
The device activation failed. The number of allowed days to use the SDK has exceeded.
Definition: ScRecognitionContext.h:177
ScContextStatusFlag
Context status of a frame.
Definition: ScRecognitionContext.h:49
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_VALIDATION_FAILED_400
Scandit SDK detected a corrupted log and could not validate this installation.
Definition: ScRecognitionContext.h:107
ScContextStatusFlag status
Execution status flag.
Definition: ScRecognitionContext.h:245
@ SC_RECOGNITION_CONTEXT_STATUS_INVALID_SDK_VERSION
The Scandit SDK validation failed. Your license key does not include support for this SDK version....
Definition: ScRecognitionContext.h:156
const char * sc_context_status_flag_get_message(ScContextStatusFlag status)
Get a human readable error message for a result status.
void sc_recognition_context_start_new_frame_sequence(ScRecognitionContext *context)
Start processing a new batch of continuous frames.
@ SC_RECOGNITION_CONTEXT_STATUS_INVALID_APP_ID
The Scandit SDK validation failed. Your app ID does not match the license key's app ID....
Definition: ScRecognitionContext.h:140
Common functions and data structures.
@ SC_RECOGNITION_CONTEXT_STATUS_UNKNOWN
The context status is unknown.
Definition: ScRecognitionContext.h:53
Common definitions used throughout the ScanditSDK API.
@ SC_RECOGNITION_CONTEXT_STATUS_SCANS_EXCEEDED
The device activation failed. The number of allowed scans has exceeded.
Definition: ScRecognitionContext.h:184
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_KEY_MISSING
No Scandit SDK license key was set. Please set a valid license key in your application.
Definition: ScRecognitionContext.h:117
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_KEY_INVALID
The provided Scandit SDK license license key is invalid. Please set a valid license key in your appli...
Definition: ScRecognitionContext.h:163
@ SC_RECOGNITION_CONTEXT_STATUS_UNLICENSED_RESOLUTION
Your license does not include the enabled resolution.
Definition: ScRecognitionContext.h:211
@ SC_RECOGNITION_CONTEXT_STATUS_INVALID_EXTERNAL_ID
The Scandit SDK validation failed. The external id does not match with the license key.
Definition: ScRecognitionContext.h:198
@ SC_RECOGNITION_CONTEXT_STATUS_UNLICENSED_SYMBOLOGY_ENABLED
Your license does not include a symbology enabled by your barcode scanner settings.
Definition: ScRecognitionContext.h:205
@ SC_RECOGNITION_CONTEXT_STATUS_UNLICENSED_FEATURE_BEGIN
Denotes the beginning of the enum range for unlicensed features.
Definition: ScRecognitionContext.h:225
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_FILE_EXPIRED
The Scandit SDK license file expired. Please obtain a new one.
Definition: ScRecognitionContext.h:91
Describes dimensions as well as internal memory layout of an image buffer.
ScContextStatusFlag sc_recognition_context_process_image(ScRecognitionContext *context, UIImage *image)
Process image frame with this recognition context.
@ SC_RECOGNITION_CONTEXT_STATUS_INCONSISTENT_IMAGE_DATA
The provided image data has missing or inconsistent properties. This error code can for example indic...
Definition: ScRecognitionContext.h:78
uint32_t frame_id
frame identification number within the current frame sequence
Definition: ScRecognitionContext.h:246
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_VALIDATION_FAILED_403
Scandit SDK validation failed. Make sure your app key is valid and check your account for available d...
Definition: ScRecognitionContext.h:112
ScProcessFrameResult sc_recognition_context_process_frame(ScRecognitionContext *context, const ScImageDescription *image_description, const uint8_t *image_data)
Process image frame with this recognition context.
@ SC_RECOGNITION_CONTEXT_STATUS_INVALID_DEVICE
The Scandit SDK validation failed. Your license key does not include support for this device....
Definition: ScRecognitionContext.h:148
void sc_recognition_context_end_frame_sequence(ScRecognitionContext *context)
Signal that a batch of continuous frames ended.
@ SC_RECOGNITION_CONTEXT_STATUS_SUCCESS
The context status is okay. No error occured.
Definition: ScRecognitionContext.h:57
Opaque recognition context data structure.
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_FILE_IO_ERROR
The Scandit SDK license file can not be found or accessed.
Definition: ScRecognitionContext.h:97
void sc_recognition_context_set_geographical_location(ScRecognitionContext *context, float latitude, float longitude)
Set the geographical location.
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_KEY_EXPIRED
The Scandit SDK validation failed. Your license key has expired. Please login to scandit....
Definition: ScRecognitionContext.h:124
@ SC_RECOGNITION_CONTEXT_STATUS_REGISTRATION_MANDATORY_BUT_NOT_REGISTERED
The registration of the device is mandatory and must be completed before the recognition context can ...
Definition: ScRecognitionContext.h:191
ScRecognitionContext * sc_recognition_context_new(const char *license_key, const char *writable_data_path, const char *device_name)
Recognition context constructor.
@ SC_RECOGNITION_CONTEXT_STATUS_FRAME_SEQUENCE_NOT_STARTED
Error code to indicate that sc_recognition_context_process_frame() was called without a prior call to...
Definition: ScRecognitionContext.h:67
ScRecognitionContext * sc_recognition_context_new(const char *license_key, const char *writable_data_path, JNIEnv *env, jobject activity, const char *device_name)
Create a new recognition context (Android only).
@ SC_RECOGNITION_CONTEXT_STATUS_LICENSE_VALIDATION_FAILED
Scandit SDK validation failed. Check your license key and network connection.
Definition: ScRecognitionContext.h:102
@ SC_RECOGNITION_CONTEXT_STATUS_NO_NETWORK_CONNECTION
Scandit SDK failed to get network access which is mandatory for certain license types....
Definition: ScRecognitionContext.h:85
@ SC_RECOGNITION_CONTEXT_STATUS_DEVICE_ACTIVATION_FAILED
The device activation failed. Please connect to the Internet and restart the application.
Definition: ScRecognitionContext.h:170
@ SC_RECOGNITION_CONTEXT_STATUS_UNSUPPORTED_IMAGE_DATA
The provided image data is not supported by the recognition context.
Definition: ScRecognitionContext.h:71
ScRecognitionContext * sc_recognition_context_new(const char *license_key, const char *device_name)
Create a new recognition context (iOS only).