Disabling screen sleep Programmatically in Android?
You can do
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
You can add this code in your onCreate()
method of your activity. or you can put it in your xml file
android:keepScreenOn="true"
setKeepScreenOn(true)