Monitoring context depends on continuous collection of raw data from sensors which are either embedded in smart mobile devices or worn by the user. However, continuous sensing constitutes a major source of energy consumption; on the other hand, lowering the sensing rate may lead to missing the detection of critical contextual events. In this paper, we propose VCAMS: a Viterbi-based Context Aware Mobile Sensing mechanism that adaptively finds an optimized sensing schedule to decide when to trigger the sensors for data collection while trading off the sensing energy and the delay to detect a state change. The sensing schedule is adaptive from two aspects: 1) the decision rules are learned from the user's past behavior, and 2) these rules are updated over real time whenever there is a significant change in the user's behavior. VCAMS is validated using multiple experiments, which include evaluation of model success when considering binary and multi-user states. We also implemented VCAMS on an Android-based device to estimate its computational costs under realistic operational conditions. Test results show that our proposed strategy provides better trade-off than previous state-of-the-art methods under comparable conditions. Furthermore, the method provides 78 percent energy saving when compared to continuous sensing.