jancona / android-on-freerunner

Automatically exported from code.google.com/p/android-on-freerunner
1 stars 1 forks source link

Automatic screen rotation is too "eager" #140

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insert Freerunner into car cradle
2. Drive down a cobblestone road
3. Watch the display

What is the expected output? What do you see instead?
I would not expect anything particular to happen. Instead, the display
darkens (just as it does prior to rotating) and locks up. After a while, it
goes back to full brightness and everything works normally. My suspicion is
that the up-down movements the device is experiencing are misinterpreted by
the accelerometers and everything is prepared for rotating the screen.

What version of the product are you using? On what operating system?
Freerunner A7 with 0.2.0 Release Candidate 1

Please provide any additional information below.
Suggestion for improvement: Rotation locks up the screen for some time,
hence be careful not to trigger it unnecessarily as that can easily become
a nuisance. If the accelerometer constantly reads 1g but the direction
changes, more or less smoothly, from near-down to something
near-horizontal, it is safe to assume that the device is being tilted to
the side. If, however, readings are way above 1g or way below or if the
direction changes oddly, the device may be being moved inadvertently and no
rotation should be triggered.
When in doubt, it may be a good idea to rotate the screen only if we have
had a somewhat constant direction from the accelerometer for a while (start
out with a second or two, the test and tweak as needed)

Original issue reported on code.google.com by mich...@vonglasow.com on 24 Apr 2010 at 7:22

GoogleCodeExporter commented 9 years ago
Or you could switch screen rotation off when you are using it in the cradle?

Original comment by hmu...@gmail.com on 26 Apr 2010 at 12:38