I want to completely disable the screen timeout. You can set a anti sleep in your application code, but it wont disable the auto sleep of Android that you can set from 15 sec to 30 min, also the programs that i downloaded from the market cant disable the 30 min auto screen sleep limit.
I want to run a AJAX webpage in the browser that has to be visible at all times, its connected to power, so power is no issue.
There is a XML way that Google recommends:
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:keepScreenOn="true">
Check http://www.google.com/events/io/2009/sessions/CodingLifeBatteryLife.html slide 16.
Or
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With