Trigger an action on or off based on camera direction

Trying to figure out how I would trigger an action on or off based on the camera direction in an AR application. Essentially when an object is in the center of camera view it should activate and when it leaves the camera frustrum it should deactivate.

Would this be done via Raycasting or?