Uses-feature accelerometer in the manifest

2019-04-19 04:22发布

问题:

With the new tag of the AndroidManifest, is it also possible to define my application requires an accelerometer? It seems to me only light sensor and proximity sensor are supported in the tag.

Thanks in advance.

回答1:

<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true" />

Is how I've declared it in my AndroidManifest, and I've yet to encounter anyone without an accelerometer with my app installed.



回答2:

According to Documentation there is a sensor feature for accelerator "android.hardware.sensor.accelerometer"