Calling recordActivity from background task?

Is it possible to call recordActivity in the background task? Documentation says it should be, but actually the "activity is already being recorded" error pops up. Is it a documentation bug?