For example:
public void onCreate() {
PowerManager pm = (PowerManager) getSystemService
(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock
(PowerManager.FULL_WAKE_LOCK, "My Tag");
wl.acquire();
}
public void onDestroy() {
wl.release();
}
On Aug 25, 4:03 pm, Streets Of Boston <[email protected]> wrote:
> Which ways did not work or were complicated?
>
> On Aug 25, 4:01 pm, Georgy <[email protected]> wrote:
>
>
>
> > Hello,
>
> > I read a lot of posts concerning preventing the screen auto lock but
> > didn't find an efficient way.
>
> > Isn't there any simple line I could put to do such a thing? everything
> > looked so complicated, or didn't work.
>
> > thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---