Release date: June 23th, 2017
Starting from this release, developers can store resources (patterns and dictionaries) outside the application package/bundle: we added a new engine setting, which specifies the path to a custom directory with the necessary resources. Please see EngineSettings interface (Android) and RTREngineSettings class (iOS) description for more details
Starting from this release RTR SDK no longer supports iOS7 officially
Data Capture interfaces
This release contains a beta version of new interfaces, using which developers are able to implement simple Data Capture scenarios:
Developer needs only to specify a regular expression, which describes the necessary field and, if necessary, the algorithm for result validation (it is useful for extraction of fields, which have a checksum). Then, when the end user points the camera at the text, containing necessary field, RTR SDK will extract only the field which corresponds to the regular expression. In case the validation rule for result is also specified, RTR SDK will extract the text only if the result meets this rule.
For example, the following code snippet helps you extract some emails (.com, .ru or .ua domains):
IDataCaptureService dataCaptureService = engine.createDataCaptureService( "", dataCaptureCallback ); IDataCaptureProfileBuilder profileBuilder = dataCaptureService.configureDataCaptureProfile(); profileBuilder.addScheme( "SAMPLE" ).addField( "EMAIL" ).setRegEx( "[a-z_]+@[a-z\\x2D]+\\.(com|ru|ua)"); profileBuilder.checkAndApply();
id<RTRDataCaptureService> service = [engine createDataCaptureServiceWithDelegate:self profile:nil]; id<RTRDataCaptureProfileBuilder> builder = [service configureDataCaptureProfile]; [builder setRecognitionLanguages:[NSSet setWithObjects:@"English", nil]]; id<RTRDataSchemeBuilder> scheme = [builder createSchemeWithId:@"Sample" name:@"Scheme Name"]; [scheme addField:@"Email" name:@"E-mail" regEx:@"[a-z_]+@[a-z\\x2D]+\\.(com|ru|ua)" predicateBlock:nil]; [builder checkAndApply];
Important! If two or more matches are found for the specified regular expression, the engine will extract only the first one.