Preventing sleep in Titanium for iPhone

Posted by Morten J on Stack Overflow See other posts from Stack Overflow or by Morten J
Published on 2010-01-10T00:59:51Z Indexed on 2010/03/18 19:21 UTC
Read the original article Hit count: 645

Filed under:
|
|

I'm trying to read the accelerometer for a longer period of time (between one and two hours).

However, when the iPhone goes to sleep and locks, the reading of the accelerometer readout is paused.

My setInterval timer seems to be running fine though. I can also play sounds.

I see two solutions

a) Find a way to read the accelerometer while locked b) Find a way to prevent the lock

I'm using Titanium with JavaScript.

© Stack Overflow or respective owner

Related posts about accelerometer

Related posts about titanium