Keep Screen On & Change Orientation

by naxtek » Thu, 12 Feb 2009 00:19:10 GMT


Sponsored Links
 Hi - After some help with this.

I am making an Android app which is currently coming along nicely -
I've hit upon a couple of stumbling blocks.


1) How do I stop the screen from going dim/off and the phone locking
while the application is running?

2) Can I force the phone to enter landscape mode on running my
application?

Thanks,
Andrew :)
--~--~---------~--~----~------------~-------~--~----~



Keep Screen On & Change Orientation

by Dianne Hackborn » Thu, 12 Feb 2009 01:57:35 GMT


 There is a flag in WindowManager.LayoutParams you can set to keep the screen
on.  (Please do NOT use the lower-level PowerManager class for this.)

Use android:screenOrientation on the activity in your manifest to force a
particular orientation mode.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Widget not displayed in Android 2.0 - Initial layout displayed only.

Our application displays widgets that update every minute through
Alarm. It works fine under 1.5 and 1.6 but since 2.0, widget is not
displayed at all. Only initial layout is displayed.

Anyone experiment this issue ?

-- 

2. Motorola DROID emulator skin now available for Android 2.0 SDK!

Motorola DROID emulator skin now available for Android 2.0 SDK!
http://teavuihuang.com/android

DROID by Motorola is a Smartphone powered by Android 2.0 and developed
in partnership with Google and Verizon Wireless. It was released on
28/10/2009 and will be available in Q4 2009. This emulator skin
faithfully brings the DROID to your Android 2.0 SDK in the original
WVGA854 resolution (480x854 high density, normal screen). The emulator
skin package, screenshots and installation instructions are now
available at the above website.

Tea Vui Huang's Android Page
[The No.1 website for Google Android Emulator Skins]

-- 

3. theme textAppearance

4. Mystery Null Pointer Error - Seeking Opinions

5. help with AnalogClock widget - remoteview and appwidgetprovider

6. API responsable to make transfert dwonlaod ,upload with ftp ou 3G protocol

7. When I scroll a list I get the force close message