Ending Sessions

End the current session with various levels of urgency

🚧

Avoid calling these in the main UI thread to prevent impacting user experience

Due to the need for the shutdown process to wait on various actions to complete successfully , please ensure that if you call shutdown(), endSession() or hardShutdown() you are doing so off of the main UI thread so that rendering is not blocked.

shutdown()

  • This function will shutdown the SDK and end the current session gracefully, ensuring all data from the current session is successfully uploaded.
  • If init() is called afterwards the previous session will be resumed.

endSession()

  • This function will shutdown the SDK gracefully and end the current session. Some session data just before session end may be lost.
  • If init() is called afterwards a new session will be started.

hardShutdown()

  • This function will shutdown the SDK as abruptly as possible and end the current session imediately, purging any session data not yet uploaded, resulting in loss of data.
  • If init() is called afterwards a new session will be started.