Carm100

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • Author
    Posts
  • in reply to: Getting rid of flashing red banner #1020336
    Carm100
    Participant

    Thanks for suggestions but I think I will use this method unless you think it unwise.

    My app always has a timer running, so in my app delegate where I get notice of when app goes to inactive and comes back active, i just set global flags so my timer can know app active status. Then my timer just uses pockecsphinxcontroller methods to stop and start listening and voila, the banner is no more while app not active. Thanks, Carmen

    in reply to: Getting rid of flashing red banner #1020333
    Carm100
    Participant

    I thought it might be something like that but when the only event I know of that tells me that my app is going into background is in my app delegate so I am left with a chicken and egg conundrum. Do you know of another event that gets triggered in my view controller that tells me I am about to go to background? or of a way to turn off the original pockesphinxcontroller from app delegate?

    in reply to: Getting rid of flashing red banner #1020329
    Carm100
    Participant

    Sorry for confusion, I am calling my (myviewcontroller stopListening) from my app delegate, which in turn calls (PocketssphinxController stopListening) from myviewcontroler where pockectsphinxcontroller resides. I will rename to differentiate better.

    in 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

    in reply to: Getting rid of flashing red banner #1020325
    Carm100
    Participant

    I have started a question on stack overflow with details of my efforts to stop listening before entering background mode, could you have a look and offer anything? Thanks.

    http://stackoverflow.com/questions/22003433/how-to-disable-iphone-app-not-active-flashing-banner?noredirect=1#comment33352072_22003433

Viewing 5 posts - 1 through 5 (of 5 total)