Hi,
I was Trying to stop text Capture Service when I m getting particular Keyword in (NSArray*)textlines.
Ex: I am looking for Anup in a textlines if I find then I want to stop the task. I don't need RTRResultStabilityStatus. Because I m only looking for the Keyword Anup. if I find Anup then my task is over.
So I am Doing [_textCaptureService stopTasks];
but this is not Stoping text Capture Service
So How I can achieve this?
#pragma mark - RTRRecognitionServiceDelegate
- (void)onBufferProcessedWithTextLines:(NSArray*)textLines resultStatus:(RTRResultStabilityStatus)resultStatus
{
performBlockOnMainThread(0, ^{
if(!self.isRunning) {
return;
}
[self.progressIndicatorView setProgress:resultStatus color:[self progressColor:resultStatus]];
for(RTRTextLine* textLine in textLines) {
NSString* recognizedString = textLine.text;
if ([recognizedString isEqualToString:@"Anup"]) {
NSLog(@"resultStatus:::%ld",(long)resultStatus);
NSLog(@"YES I m here");
[_textCaptureService stopTasks];
}
}
});
}
This is My code Snippet.