How to access Galaxy S5 temperature sensor?

57,569

Galaxy S5 does not have Temperature and Humidity sensors, unlike S4. Samsung announced it and close to publishing decided not to ship it. It seems that the reason was the fact that these two sensors could not work along with water-proof feature.

S Health app has ability to measure body temperature but its API is hidden at this moment. It means that we have no clue if it measures temperature via external devices (Gear) or it can measure it using heart-rate sensor. Also we don't know if it can measure air temperature (probably not).

Share:
57,569
sandalone
Author by

sandalone

A developer since 1999, started with Java. A freelancer since 2009, and a client hiring freelancers since 2011. Have been using Android Studio and Gradle since 0.1.

Updated on October 28, 2020

Comments

  • sandalone
    sandalone over 3 years

    In the manual on the page 19 there is an info on temperature sensor in S5.

    Temperature and Humidity sensor allows your device to read both temperature and humidity conditions. This is useful to calculate calories burned within S Health

    But I cannot seem to find any data on how to use this sensor.

    Did anyone find any way to use this sensor in our own app?

    EDIT

    Take note that if you install any 3rd party temperature application, it will say that your device (S5) does not have temperature sensor. So I cannot use the standard code to access the sensor because sensor is not being detected. But Samsung app S Health is using this sensor and I am not sure which API it uses.

  • user3573421
    user3573421 about 10 years
    @sandalone I saw it, but have you tried what I have suggested? TYPE_AMBIENT_TEMPERATURE is new, previously to read temperatures you had to use TYPE_TEMPERATURE. Maybe the 3rd party apps still use that? Also, why dont you try decompiling the Samsung app which uses temp sensor, you might find the details on how to use it. It might be unethical but it's a sure way to find out if they are using custom code or relying on official Android APIs.
  • user3573421
    user3573421 about 10 years
    Also, see this: reddit.com/r/tasker/comments/1fvdo8/… Might work for S5 too
  • sandalone
    sandalone about 10 years
    It breaks on this sensor as well.