[android-developers] Re: How to prevent phone from sleeping
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 <softgamesg...@googlemail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home