Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any Android api to find/sense room temperature programmatically in android code?

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:

  1. What sensors need to be available in my Android phone to perform this temperature sensing task?

  2. Can Ambient Light Sensor (available in Droid 2) help in doing this task?

  3. Is there any Android api to find/sense room temperature programmatically in my android code?

Thanks in advance for your help.

like image 950
talasila Avatar asked Aug 08 '11 16:08

talasila


People also ask

Can I check room temperature with my Android phone?

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.

How can I check my room temperature by mobile?

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.

Is there an app that can sense temperature?

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.


1 Answers

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.

like image 104
Otra Avatar answered Oct 01 '22 13:10

Otra