Skip to content
This repository was archived by the owner on Mar 26, 2023. It is now read-only.

When application enter background and then enter foreground application will crash #253

Open
jassadakorn opened this issue Jan 5, 2016 · 4 comments

Comments

@jassadakorn
Copy link

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

This is break point in StreamSession.mm

Can you help me resolve this issue?

@maxcampolo
Copy link

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

@shravanteegala
Copy link

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.

@Jatindave
Copy link

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];
}

@artFintch
Copy link

Hey! Probably I fixed this issue #348

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants