Where and how are you turning GPS on? I feel like you aren't giving all the steps so it's hard to see why it wouldn't be working.
Thanks for the reply. GPS launches when I click on the widget I mentioned. It enables gps and then gives me a menu of the four apps. If I use 1 or 0 as a variable value, do I then have to use maths? Or can I still use match statements? I will try your suggestions to see if that helps. I can see how using a variable state as context may work better.