Hello Bruno
How many smartphones are there that do not already have that facility? More sophisticated too, with a choice of energy saving modes.
I think you would need to use an extension - Taifun has a nice one that might suit your requirement:
You would also need your App to run in the Background: