Generic and Energy-Efficient Context-Aware Mobile Sensing