ServiceApplication: complete attachToCamera function.