Controlling Session Lifetime: VoIP Application

If your application uses VoIP and goes to the background and you wish to prevent the session from ending there are a few things you have to do. Your application needs to have an event when there is an active call, and when the call has ended.

Use Appsee.addAppseeListener() to register on our callbacks. Make sure to register only once!

As we want to prevent the session from ending if we're in a call, each time AppseeListener.onAppseeSessionEnding() is getting called the app should use: sessionEndingInfo.setShouldEndSession(CallManager.isCallInProgress());

When a call is ended externally (from the notification center for example) we should end the session, therefore - when a call is ended, we need to call Appsee.finishSession(true, true); If the call is ended when the app is still in the foreground, Appsee will detect it and do nothing, so you can call this method in every call end.