App to turn on and off the gps during an actibvity

Hi,

Do you think that it could be possible to create an app that turn on and off the GPS (maybe switching from one power configuration to an another) during an activity ?

Best regards