iOS background audio recording after call -


i'm developing ios application records audio in background. that's work fine.
problem when call comes in: when i'm calling app stops record (that's fine) when call ends, need app start record again.

is possible ? how can ?

thanks all.

update

i use audioqueuenewinput record audio. i'm trying use code incoming call:

avaudiosession *session = [avaudiosession sharedinstance]; nserror *categoryerror = nil; [session setactive: no error: nil]; if (![session  setcategory:avaudiosessioncategoryplayandrecord                withoptions:avaudiosessioncategoryoptionmixwithothers                      error:&categoryerror]){     nslog(@"error"); //no error } [session setactive: yes error: nil]; [[nsnotificationcenter defaultcenter] addobserver:self                                          selector:@selector(handleaudiosessioninterruption:)                                              name:avaudiosessioninterruptionnotification                                            object:session]; 

i can ends of call on handleaudiosessioninterruption avaudiosessioninterruptionoptionshouldresume, how can restart audio recorder?

i tried use call audioqueuestart again o same function use start record, can't see red bar (mic in use) know app recording. what's wrong ?

please see question: can not restart interrupted audio input queue in background mode on ios

yes possible, reactivate session in background, audio session has either set audiosessionproperty kaudiosessionproperty_overridecategorymixwithothers

osstatus propertyseterror = 0; uint32 allowmixing = true; propertyseterror = audiosessionsetproperty (                    kaudiosessionproperty_overridecategorymixwithothers,                    sizeof (allowmixing),                    &allowmixing); 

or app has receive remote control command events:

[[uiapplication sharedapplication] beginreceivingremotecontrolevents]; [self becomefirstresponder]; 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -