Creating a temperature-sensing Android app that runs in the background after activation
问题 I am developing an Android application that will keep track of the temperature of the battery of the phone. When the temperature of the battery exceeds some certain value, another activity will then give an alert which is an alarm. How can I let my application keep track of the temperature of the battery and send that info to another activity (an alarm system) to compare values and determine whether to set off the alarm? I am using Eclipse and Android 4.1.2. 回答1: There's a sensor. For Android