ronash
ronash

Reputation: 866

Using hardware components in Android (Java)

Hey, Sorry to bother you with such a silly question, but I can't find the answer myself.

I'd like to use hardware components in my applications (or: sensors), but it seems that I don't have the necessary files, as writing import android.hardware.Sensors; causes an error ("The ... cannot be resolved"). It is weird because I can import all other classes without any problem; I've downloaded the SDK. So what is wrong?

Thank you in advance.

Upvotes: 1

Views: 750

Answers (3)

user727374
user727374

Reputation: 167

are you sure it isn't import android.hardware.Sensor; instead of import android.hardware.Sensors;

grtz

Upvotes: 5

Femi
Femi

Reputation: 64700

You mean import android.hardware.Sensor;. See http://developer.android.com/reference/android/hardware/Sensor.html.

Upvotes: 3

Vladimir Ivanov
Vladimir Ivanov

Reputation: 43098

Sensors information can be used with help of SensorManager.

Upvotes: 3

Related Questions