Is there any way to disable sleep of android mobile phone when user is in certain activity.
I want to disable screen time out when user is in main activity.
Is there any way to do it? Don't know if it is possible or not?
Try this.
@Override
protected void onCreate(Bundle icicle)
{
super.onCreate(icicle);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}