Is there way to get information if device settings is enable to locked screen orientation?
Asked
Active
Viewed 813 times
1 Answers
5
You can check the value of Settings.System.ACCELEROMETER_ROTATION setting like so:
final int rotationState = android.provider.Settings.System.getInt(
getContentResolver(),
Settings.System.ACCELEROMETER_ROTATION, 0
);
When the auto-rotation is enabled, this value equals to 1 (and 0 otherwise).

aga
- 27,954
- 13
- 86
- 121