user3409263
user3409263

Reputation: 117

Galaxy s3 has Temperature sensor?

I am creating a thermometer app in android when I test on Galaxy S3 it shows that

TYPE_AMBIENT_TEMPERATURE NOT Available

TYPE_TEMPERATURE NOT Available

I want to know that Galaxy S3 has above sensors or not? or How I can solve this issue to get temperature ?

Upvotes: 6

Views: 13053

Answers (3)

Sebastian Staacks
Sebastian Staacks

Reputation: 353

Not sure if this also applies to the Galaxy S3, but you can try to look for sensors with a type value above TYPE_DEVICE_PRIVATE_BASE. Many phones (for example Nexus 5x and Pixel 3) have one or even multiple sensors that exhibit a temperature reading through this and you usually can tell by the name of the sensor (for example "BMI160 Temperature" or "BMP380 Temperature", both on a Pixel 3).

These "vendor defined sensors" are usually from sensors that require a temperature reading for compensation/calibration (BMI160 is the IMU and BMP380 the barometer of the Pixel 3). Especially barometers are very likely to have a temperature channel.

However, there is a good reason that the manufacturer does not offer these temperature readings through the official TYPE_AMBIENT_TEMPERATURE type: Placing a thermometer inside an enclosed device that heats itself from the inside is not a good method to measure the ambient temperature. Especially if the temperature reading is only meant to compensate temperature drift of the sensor, you will not get anything useful as you mostly measure the temperature of the inside of your phone. Even if a phone officially measures ambient temperature, the results will not be very precise for the same reasons.

Upvotes: 0

ugur
ugur

Reputation: 3654

As Yohannes said in the comment you can only calculate standard atmospheric temperature which is not useful to for daily use mostly used in aviation.

Here is the temperature estimation vs barometric height. http://home.anadolu.edu.tr/~mcavcar/common/ISAweb.pdf (page 2).

It seems only way to use an external temperature sensor with bluetooth or similar stuff and require this sensor in your app promotion.

This is really cool one: http://www.bee-wi.com/bbw200,us,4,BBW200-A1.cfm

Upvotes: 1

SidJ
SidJ

Reputation: 677

An easy way to check if a sensor exists on a specific target phone is to install an app like AndroSensor. This will list all the available sensors.

I doubt if the underlying sensor is missing you'll be able to do much. You can use a weather service to get the current temperature of the device's location but that won't help with a thermometer.

Upvotes: 0

Related Questions