Reply To: Getting rid of flashing red banner

Home Forums OpenEars Getting rid of flashing red banner Reply To: Getting rid of flashing red banner

#1020327
Carm100
Participant

Sorry, don’t understand that response, here is the issue:

If I stop OpenEars pocketsphinxController from listening with a button that calls this method while the program is active, the banner disappears when the app loses focus:

-(void) stopListening{
NSLog(@”Tried to stop listening”);
[pocketsphinxController stopListening];
}
BUT if I call the same method from my app delegate with (I had to import my view controller.h file in my app delegate.h and add -(void) stopListening; in my view controller.h to make the below execute properly):

– (void)applicationWillResignActive:(UIApplication *)application{
myViewController * vc = [[myViewController alloc]init];
[vc stopListening];
}
The banner persists! It is a little like ios7 has decided I am a recording culprit before I even have a chance to turn it off. OR, am I even turning it off? How do I do this effectively and in what event?

UPDATE – So it turns out I am not really turning pocketsphinxController off when ‘stopListening’ is called from the app delegate. I know this because it DOES log the ‘Tried to stop listening’ when called from app delegate but the pocketsphinxController does not respond with its ‘pocketsphinxDidStopListening’ method. PocketsphinxController does call its ‘pocketsphinxDidStopListening’ method when I call ‘stopListening’ from a button while the app is active.

Why won’t the pocketsphinxController respond when called from from the app delegate, I must be doing it wrong?

Thanks,Carmen