I try to read the accelerometer for a longer period of time (one to two hours).
However, when the iPhone goes into sleep mode and locks, the accelerometer reading stops.
My setInterval timer seems to work fine. I can also play sounds.
I see two solutions
a) Find a way to read the accelerometer when it is locked b) Find a way to prevent blocking
I am using Titanium with JavaScript.
source
share