Self-adaptive battery and context aware mobile application development