开发者

Using hardware components in Android (Java)

开发者 https://www.devze.com 2023-03-01 05:19 出处:网络
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 ne

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 err开发者_StackOverflow社区or ("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.


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

grtz


Sensors information can be used with help of SensorManager.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消