Yeah!!!!

The code to prevent phone from sleeping:

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


Have fun!!!

On 27 Sep., 17:24, SOFTGAMES <[email protected]> wrote:
> 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

-- 
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