How to limit Auto Rotate to 90° and 180° only - Android Software/Hacking General [Developers Only]

So I know CM7 can do it but unfortunately there is no CM7 for my device. Is there any app or any root file edits to limit so auto rotate just stays upright and then goes 180 degrees?
Im sick and tired of it going upside down and the other way when I barley turn the screen.

Afaik that setting in AOSP ROMs is stored in a .dex file, so unless you have the environment to edit that I do not know of another way. At least that is what I recall when Froyo added landscape right orientation.

Related

Request: Tighten up auto rotate triggering

I'm wondering if there are any apps that adjusts or replaces the auto rotate feature in android. I often find myself in situations where the orientation switches on me when I'm laying on my side or when I'm trying to see the screen because of an unexpecting notification, phone call or I'm just trying to get the phone out of my pocket.
I like to see an app where the orientation will only change if the specifide angle, tilt and time conditions are met. For example, if you want to switch from landscape to portrait. you hold it at a very exact angle of orientation (ie 90°+/-1°) at a specifide tilt (ie between 15° and 90°) for a specifide time (ie 500 ms) and then it will change from landscape to portrait mode.
I also like to see a setting were it will turn off auto rotate when the tilt goes beyond 90°, like when you lay down on your back.
-------------------------------------
Sent via the XDA Tapatalk App
I agree.
I find if I put the phone horizontally on a table it often will go into landscape mode. It is quite a pain to worry about the angle I put my phone on a table.
Customizing the tilt variables would be awesome.
I am still looking around the internet for a solution. If you find one let me know.

[Q] Force app to run with 180-degree rotation

I would like to run my application with 180-degree rotation all the time, no matter what the current sensor value is. For 0 or 90 degree rotations, I would set screenOrientation to "landscape" or "portrait" in the manifest file, or call setRequestedOrientation() from code.
The problem is, the Android API doesn't know anything about the 180 degree rotation that CM provides, so it is difficult to access from within my application. I would be open to any possible solutions, no matter how convoluted
I'm running CyanogenMod-6.0 on the Nexus One.
Thanks

Orientation locking method?

Tons of people want to be able to lock their phone in landscape mode (most default allow locking to portrait but none to landscape without hard keyboards).
We have plenty of people who roll android kernels here. Is it not possible to edit the bma150 accelerometer driver (i assume this is the one most/all android phones use.. am i wrong?) to report orientation based on a sysfs file. If the user writes a 0 to a certain sysfs file that the driver creates upon load, then orientation is like stock android behaves. If we write a "1" to the file, it could lock orientation in whatever position it's in and spoof any request for orientation to whatever this value is locked at. Each request would query the sysfs file and the user can write a "0" to unlock it.
Then we can create a widget/app that does the writing to the sysfs file. Obviously, this would only function for rooted phones.
Is this something that's not possible because the accelerometer drivers are different and closed source for each phone or what? I dont believe i'm the first person to come up with this idea so there has to be some reason why it's not done.
Hi,
install AutoRotate from the Market...it will enable or disable automatic rotation if you make a long press on the "search" button (or obviously if you start this app).
Bye
I agree I would find this extremely useful to be able to lock the tablet in any of the 4 possible orientations. Currently autorotate simply let u toggle between the default orientation (landscape on my tablet) and auto rotate on. I would love to be able to lock rotation at any position.
autorotate on my phone would just turn off autorotate or turn it on. this means portrait mode or non-locked rotate. Not what i'm describing at all and not what most people want.

Auto rotate screen not working; ideas?

My TF101 (running Prime 2.1.1) has been acting strange since yesterday (when I first noticed it). The screen orientation will not auto adjust if I move the tablet, e.g. from holding landscape in two hands to holding it on it's side, it stays in landscape. If I run an app that lacks orientation support or fakes it, I may end up with my tablet locked into portrait mode! Rebooting doesn't impact anything.
Toggling the Screen->Auto Rotate setting in the settings app (NOT the quick controls) will give me the correct orientation most of the time. Docking will (so far) always get my back to landscape. So for the most part, I have no auto-rotate and running a protrait apps can lock my screen rotation to portrait. Docking is the only reliable thing so far...
Possible abuses:
-> I usually put my dock and tablet in my backpack but "Undocked", and stow the pack on my cars floor board, it doesn't get bounced around but maybe payback for leaving it undocked?
-> For the past couple weeks I've been using the quick control to lock the screen so I can display stuff upside down; e.g. to use landscape in bed, while charging.
but other wise it's pretty well taken care of, better than most peoples PC's. When I boot, it is usually laying flat on a desk or docked.
Personally, I use my tablet i landscape whenever an app doesn't force me to do otherwise....but I'm concerned about hardware failure in the sensor. Being root+Prime, I'd rather not RMA if possible.
Does anyone have any advice or ideas about this?
Sent from my Transformer TF101 using Tapatalk
I found this app can do all orientations.
Orientation Control
Unsure what is causing your problem, however.
Good luck!
settings
In settings/screen is auto-rotate screen ticked.
Colin
I will have to test that app as a manual fix, and yes the auto rotate is checked; i believe the locking when apps force portrait still occurs when it is unchecked though.
Sent from my Transformer TF101 using Tapatalk

Disable 90 Degree rotation?

Hey guys im on the P3113 with AOKP JB Build 4 and i like to use my tablet at 90 degrees in landscape mode but when i do that it goes to portrait upside down (I know its weird to use a tablet 90 degrees but eh..) i used to use aosp and i could disable 90 degrees but i love AOKP but it does not have that feature if anyone got any ideas or help..please
Austin3161337 said:
Hey guys im on the P3113 with AOKP JB Build 4 and i like to use my tablet at 90 degrees in landscape mode but when i do that it goes to portrait upside down (I know its weird to use a tablet 90 degrees but eh..) i used to use aosp and i could disable 90 degrees but i love AOKP but it does not have that feature if anyone got any ideas or help..please
Click to expand...
Click to collapse
I think this is related to how the tablet thinks its default orientation is. The Tab 2 7.0's default orientation should be portrait (according to the Samsung logo), but the OS thinks the default orientation is landscape, which is correct for the 10.1's, but not for the 7.0's.

Categories

Resources