This documentation outlines running TokBox in the background, i.e. when the phone is locked. The following is an excerpt from the limitations of running TokBox in the background:

Apps cannot do the following while in the background state:

  • Use the camera as a video source for a publisher.

The documentation goes on to explain that you can keep an audio-only session active when running in the background, but not a video session.

Credit Goes to: stackoverflow.com

Related question with same questions but different answers