x


I want to prevent android phone from going to sleep using my code?

I want to prevent android phone from going to sleep using my code? How to do that please help.

more ▼

asked Sep 16 '10 at 04:05 AM

Jacob 2 gravatar image

Jacob 2
36 2 2 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It appears you can set iPhoneSettings.screenCanDarken to false to achieve this at the moment.

more ▼

answered Sep 20 '10 at 02:50 PM

Dave 5 gravatar image

Dave 5
132 1 2 7

I just built and confirmed this works. Adding that line shows the permission "System tools prevent phone from sleeping".

Apr 11 '11 at 04:31 AM JoshOClock
(comments are locked)
10|3000 characters needed characters left

This has already been answered ... Android: prevent phone from sleeping

Settings/Applications/Development/Stay Awake (check that)

more ▼

answered Sep 16 '10 at 04:07 AM

Marowi gravatar image

Marowi
4.9k 4 14 53

But I want to do it in my program itself. Please provide me the code.

Sep 16 '10 at 04:16 AM Jacob 2
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2458
x34

asked: Sep 16 '10 at 04:05 AM

Seen: 3267 times

Last Updated: Sep 16 '10 at 04:08 AM