Google Nexus One: How to Prevent the Screen from Entering Sleep Mode While Charging
If you would like to keep your Nexus One’s screen on while it charges so that you can make use of applications like the Clock app, you can but you need to know where to look.
1. Go to the Home screen.
2. Select the Menu key.
3. Select Settings.
4. Select Applications.
5. Select Development.
6. Check the Stay awake checkbox.




Guest said on July 19, 2010
I’m developpping an android application, and need to find the option where the phone doesn’t go to sleep mode even if no usb cable is attached. Must be some attribute in the manifest.xml, because the descriptions of loads of applications you can download from the market say they prevent the phone from sleeping.
In my phone (Motorola Milestone) there’s an option too to set the timeout of the screen to “never” or something like that, but I would like to do it from code.