Prevent android from sleeping while the app is running

My friends, I ask you to show me a script that can prevent the Android system from sleeping while the application that I am making is running. Thank you for the help

use the keep screen on property


Thank you very much Taifun, I have tried it and it works.