取系统转屏设置, 机器是否有G-sensor

ContentResolver resolver = getContentResolver();
int userRotation = Settings.System.getInt(resolver, Settings.System.ACCELEROMETER_ROTATION, 0);

List<Sensor> list = sensorMgr.getSensorList(Sensor.TYPE_ACCELEROMETER);

你可能感兴趣的:(sensor)