You are here

Landscape orientation lock for Milestone

Update 17 July 2010: Simple application added

The phone can be locked to the landscape orientation by simulating the HW keyboard slide-out, while the keyboard can be actually slid-in.

Slide-out:
sendevent /dev/input/event4 5 0 0
It can be useful e.g. when using the Milestone as a navigation device in the car dock while driving on a bumpy road to prevent an accidental switch to the portrait mode.

A slide-in can be simulated this way:
sendevent /dev/input/event4 5 0 1
Or you can actually slide the keyboard out and in when you no longer need the lock.

You can use the simple application attached below. When run, it will simulate the slide-out. To unlock the landscape orientation afterwards, you can simply slide-out and -in the HW keyboard.
The application needs su rights.

AttachmentSize
LandscapeLock.apk19,72 KB

Comments

Can this be done without having it turn on the keyboard back light which drains the battery faster.

The keyboard light for milestone is constantly off, whether if it is light or dark. It started to happen since the update of firmware. It is now 2.1-update 1 GAS_EMEA_USASHLSOORTING_P016. No matter what tricks I have tried on line, it just doesnt switch on! Can anyone help!

Can anyone please send me the solution or suggestion to chefboyct@gmail.com.

Thanks

THANK YOU!

I've been looking all over the place for a landscape locker. I think you're the first in the world to make one.

Now, how about turning it into a portrait/landscape toggle switch?

Hi,
Can u try working on Orientation animation, it happens with iphone for smooth orientation when ever phone changes it orientations..

i been looking for it since long...

Thanks,
Bushan

Try "Spare Parts" in the market, there is an option to enable that animation

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.