Hi. 

Good Morning, Im having slight confusion when trying to create a custom data field for read digits chars. I've read the developers handbook and I still have been able to figure it out. http://rtrsdk.com/documentation/how-to/android-custom-data-capture. Please in your answer provide an example. 

Please show; 

1.Whats wrong with my code?

2. What wrong with my RegEx?

3. How I can control threads in process scanning my text?

 

Thank you!

 

    private boolean createTextCaptureService() {
try {
engine = Engine.load(ScannerActivity.this, licenseFileName);
dataCaptureServic = engine.createDataCaptureService(null, new IDataCaptureService.Callback() {
@Override
public void onFrameProcessed(
IDataCaptureService.DataScheme mDataScheme,
IDataCaptureService.DataField[] lines,
IRecognitionService.ResultStabilityStatus resultStatus,
IRecognitionService.Warning warning) {

if (mDataScheme == null) {
surfaceViewWithOverlay.setLines(null, ITextCaptureService.ResultStabilityStatus.NotReady);
return;
}
if (!stableResultHasBeenReached) {
if (resultStatus.ordinal() >= 3 && lines != null && lines.length > 0) {
surfaceViewWithOverlay.setLines(lines, resultStatus);
} else {
surfaceViewWithOverlay.setLines(null, ITextCaptureService.ResultStabilityStatus.NotReady);
}
if (resultStatus == ITextCaptureService.ResultStabilityStatus.Stable) {
isMakeInitScanner = true;
onStartButtonClick(true);
stableResultHasBeenReached = true;
surfaceViewWithOverlay.setFillBackground(true);
startButton.playSoundEffect(android.view.SoundEffectConstants.CLICK);
}
}
}

@Override
public void onRequestLatestFrame(byte[] data) {
camera.addCallbackBuffer(data);
}

@Override
public void onError(Exception e) {
}
});
IDataCaptureProfileBuilder profileBuilder = dataCaptureServic.configureDataCaptureProfile();
profileBuilder.setRecognitionLanguage(Language.English);
profileBuilder
.addScheme(SCHEME)
.setName("Profile")
.addField("sampleField")
.setRegEx("([0-9+>]*\\)*\\(*\\s*)+");
profileBuilder.checkAndApply();

return true;
} catch (java.io.IOException e) {
} catch (Engine.LicenseException e) {
} catch (Throwable e) {
}
return false;
}