VideoCore-Inactive icon indicating copy to clipboard operation
VideoCore-Inactive copied to clipboard

When application enter background and then enter foreground application will crash

Open jassadakorn opened this issue 8 years ago • 4 comments

screen shot 2559-01-05 at 1 57 21 pm

This is break point in StreamSession.mm

Can you help me resolve this issue?

jassadakorn avatar Jan 05 '16 07:01 jassadakorn

Stop the stream when you go to background and restart it when you enter foreground again.

maxcampolo avatar Jan 05 '16 13:01 maxcampolo

to manage my session whenever I want without a crash ! Use this if (_session) {

for (UIGestureRecognizer *recognizer in _session.previewView.gestureRecognizers) {
     [_session.previewView removeGestureRecognizer:recognizer];
}
[_session.previewView removeFromSuperview];
 _session = nil;

}

you put this code Add Observer using ApplicationDidEnterBackGround Notification.

shravanteegala avatar Jan 08 '16 09:01 shravanteegala

Stop the stream when you go to background and restart it when you enter foreground again.

-(void)appWillResignActive:(NSNotification_)note { [session pauseCapture]; } -(void)appBecameActive:(NSNotification)note { [_session resumeCapture]; }

Jatindave avatar Mar 09 '16 12:03 Jatindave

Hey! Probably I fixed this issue #348

artFintch avatar Oct 04 '16 15:10 artFintch