I seem to have an error here. i am trying to change the accelerometer auto-rotate value in the settings.
Now, i manage to lock and un-lock rotating the device. However, whenever i lock the device it goes into portrait mode, no matter in what orientation i was while locking it.
Here is my code:
public void setAutoOrientationEnabled(boolean enabled)
{
Settings.System.putInt(content, Settings.System.ACCELEROMETER_ROTATION, enabled ? 1 : 0);
}
Thanks for any help!