Thank you!!!  Best answer!

the code is:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

On 27 Sep., 17:35, Mark Murphy <[email protected]> wrote:
> Another possibility, if it is an activity, is:
>
> http://developer.android.com/reference/android/view/WindowManager.Lay...
>
>
>
>
>
> On Mon, Sep 27, 2010 at 11:30 AM, Kostya Vasilyev <[email protected]> wrote:
> >  There is this band called "Power Manager and His Fabulous Wake Locks":
>
> >http://developer.android.com/reference/android/os/PowerManager.WakeLo...
>
> > -- Kostya
>
> > 27.09.2010 19:26, SOFTGAMES пишет:
>
> >> Hello,
>
> >> I am developing an application, for an optimal operation I need that
> >> the app prevents phone from sleeping. How can I do it?
> >> It has to be like google maps:
> >> System Tools
> >> prevent phone from sleeping
>
> >> Greetings
>
> > --
> > Kostya Vasilyev -- WiFi Manager + pretty widget --
> >http://kmansoft.wordpress.com
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://skillsmatter.com/go/os-mobile-server

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to