I found similar questions on different forums yet they usually asked regarding solutions in API. I'd prefer to ask the question allowing for a broader spectrum of solutions.
I was wondering whether or not it's possible through code to disable any kind of powering off, including resetting, for the duration of a certain activity. It would be greatly preferable if it didn't involve having to use a rooted phone. The solution needn't involve an exact method via the API but rather an algorithm such as putting the phone in a loop of some sort so that powering down isn't possible until the end of the procedure. During this time the application is waiting to receive a communication from a server which dictates that it's fine to continue regular activity (including returning functionality of power options) .
Any creative ideas