I am developing an android app for my project, I need to find room temperature as part of it. I am using Droid 2 A955 model for testing.
My Questions are:
What sensors need to be available in my Android phone to perform this temperature sensing task?
Can Ambient Light Sensor (available in Droid 2) help in doing this task?
Is there any Android api to find/sense room temperature programmatically in my android code?
Thanks in advance for your help.
Thermometer is an app for Android that allows a user to know room temperature. The app also detects battery temperature. It uses °C or °F.
Using a Smartphone. Download a thermometer application to your smartphone. Many smartphones are equipped with sensors that they use to monitor the temperature of the device. You can download an app that uses these sensors to take an ambient temperature reading of the room.
Available in both Celsius and Fahrenheit, Electronic Thermometer HD is a temperature gauging app that can be used as a widget on your home screen for constant access and updates. And it's really easy to set up.
To answer all three of your questions in one fell swoop, no, I don't believe so. There can be a temperature sensor in android devices, but it senses the temperature of the battery, not the outside temperature. It would not provide an accurate gauge for that purpose.
I'm not sure how an ambient light sensor would help with temperature, it can be very bright out but it could be in an air conditioned room.
Lastly: there are lots of examples of temperature apps, but again, most are related to the battery.
Edit: Official documentation says:
Device implementations MAY but SHOULD NOT include a thermometer (i.e. temperature sensor.) If a device implementation does include a
thermometer, it MUST measure the temperature of the device CPU. It MUST NOT measure any other temperature. (Note that this sensor type is
deprecated in the Android 2.3 APIs.)
Update:
API level 14 (i.e. Android 4.0) onwards, support for measuring ambient temperature has been added (via TYPE_AMBIENT_TEMPERATURE
). [Android doc reference]
This, however, will work only on devices with ambient temperature sensor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With