Motion sensors available on wearable devices make it possible to recognize various user activities. An accelerometer is mostly sufficient to detect simple activities, such as walking, but adding a gyroscope or sampling at a higher rate can increase the recognition rate of more complex activities, such as smoking while walking. However, using a high sampling rate, more than one sensor at a time, may cause higher and unnecessary resource consumption on these resource-limited devices. In this paper, we propose a context-aware activity recognition algorithm (Conawact), which dynamically activates different sensors, sampling rates and features according to the type of the activity. We evaluate the performance of Conawact and compare with using static and semi-dynamically adaptable parameters. Results show that Conawact achieves 6% better recognition rate, on average, and up to 20% for some complex activities, such as smoking in a group, and 22% less energy consumption compared to using static parameters.