Toggling an app on/off via device orientation?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Alex
Posts: 11
Joined: 04 Dec 2015 02:27

Toggling an app on/off via device orientation?

Post by Alex » 14 Dec 2015 04:25

I use one app so much I want to toggle it on and off by rotating the phone sideways. I have found one way.

-trigger device orientation
-condition app task running
--> true: action show homescreen
-->false: action launch homescreen

Question:

I would like to use device orientation to toggle a global variable. How do I do this?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Toggling an app on/off via device orientation?

Post by Martin » 14 Dec 2015 20:13

Hi,

You could use an action Script: global_variable=true; respectively Script: global_variable=false; to toggle the global variable after the condition is executed.

Regards,
Martin

User avatar
Alex
Posts: 11
Joined: 04 Dec 2015 02:27

Re: Toggling an app on/off via device orientation?

Post by Alex » 15 Dec 2015 01:15

Thank you. I'm having difficulty but I'll keep trying.

Post Reply