Preventing sleep mode on android
Hi.
How works on Android Titanium.App.idleTimerDisabled = true; ?
i need my application never go in sleep mode.
I insert into my code but doesn't work.
I declare this at the top of my code and nothing happened.
I declare inside a function and nothing happended.
There's some trick to use it?
Could you help me?
8 Answers
-
Hi everyone. I too wanted to keep my application to keep the screen on and preventing sleep mode (esp Android). I was looking for alternatives to Titanium.App.idleTimerDisabled and i stumbled upon keepScreenOn property of Titanium.UI.View. It seems to be doing the trick for me.
Hope this helps
-
I'm sorry that the documentation doesn't call it out, but that is an iPhone only property at this time.
-
Someone could help me?
There's some tricks to declare this behaviour on AndroidManifest.custom.xml?
Regards
-
You're not alone, see my post/ticket here:
http://developer.appcelerator.com/question/70771/prevent-screen-from-turning-off-android
-
Any headway on this? Is idleTimerDisabled already available for Android? If not, please update the documentation accordingly, it's very frustrating to keep trying and finally come to the conclusion the whole method is not available at all in Android.
-
Is there any update? it's still not working
-
I need this function available on Android too. Is there any news yet?
-
I have the same problem working on sdk 2.1 and I can´t understand why developers can´t solve that but… testing too much, setting up the permission WAKE_LOCK and setting the data conection ON (that´s the trick I think) My background service works very well.
I hope this help.
Excuse my english.