Hi, I wonder if any one has example solution on how to switch off or on the mobile data using AutoInput and Tasker. Normally I would like to specify that once the desired WIFI connection is detected, then explicitly turn off the mobile data (regardless of current state of mobile data). Toggle of mobile data will not work some times because for some reason, it the state of mobile data is off, it will toggle it to be on. Tasker alone used to work well but since the newer version of Android no longer support this, I wonder if there is some simple way out. I looked through some examples in the AutoApps web site but they all seem to be example of toggling. I noticed there is a way to query the state of mobile data and then flash it as text but not sure how can I use this for my purpose. Any help is appreciated
By gettting the current state it's just a matter of not doing anything if the state is already off hope this helps!
How do I perform a check on the status of mobile data status, depending on if it is on or off, then will take the next action to toggle it or not. Do you have similar examples I could follow ?
But in the OP you said "I noticed there is a way to query the state of mobile data and then flash it as text but not sure how can I use this for my purpose.". I thought you knew how to do this already?
Yes. This is the example I saw. But after getting the variable status, how do I use this to check before doing a toggling ? The example only showed how to get the variable, then flash it. How to use this to do a check ?
Hi, I followed the example in http://forum.joaoapps.com/index.php?resources/toggle-mobile-data.202/ It captures a field called "status" and then later flash it. So how do I go about using this field status to check, then decide if I should proceed with toggling ?
Add an If action in Tasker and set the condition to %status matches ON and inside the If switch the mobile data to off. If it doesn't match ON don't do anything
Thanks. I have done something similar last few days but just can not get it through. Now for instance, if I go to mobile data setting and set the ticked field variable called checkon, I see the following code: Only Visible:false Only Clickable:false App Package:com.android.phone Check Screen State:false Vairables:checkon() When I define a if statement in tasker such as %checkon() ~ ON On the task screen, to the extreme right, there is a red mark indicating probably syntax error so I can not execute it. In the edit menu, if I press the "coffee icon" icon, it says nothing found. I tried with value OFF also with the same error. Am I doing the right thing ? What kind of value should I assign to match ?
Thanks. I have done something similar last few days but just can not get it through. Now for instance, if I go to mobile data setting and set the ticked field variable called checkon, I see the following code: Only Visible:false Only Clickable:false App Package:com.android.phone Check Screen State:false Vairables:checkon() When I define a if statement in tasker such as %checkon() ~ ON On the task screen, to the extreme right, there is a red mark indicating probably syntax error so I can not execute it. In the edit menu, if I press the "coffee icon" icon, it says nothing found. I tried with value OFF also with the same error. Am I doing the right thing ? What kind of value should I assign to match ?
Hi, This is the full workflow. 1. I went to mobile setting screen shot 1 and 2 2. Then I select the field Array:Checkbox not Checked (off). See screen shot 3 3. I then defined the variable to be "checkbox". I then look at the name again to confirm. See screen shot 4 4. Now my configuration is as shown in screen shot 5 5. I then open the task to so a if statement and select the check box field and put the required condition. See screen shot 6, 7, 8 6. On tasker, you can see that to the extreme right of the if statement, there is a red bar indicating some error. See screen shot 9 Hope all is clear
That red bar is not important Don't worry about it. Can you add a flash action to see what %checkbox() contains? Thanks
Very strange. I took away the if statement and add a flash command. But nothing run. See the screen output. Below there is a stop button and the process just stays there. Nothing is flashed.
It seems you're not opening the screen where you toggle the data first, right? You have to open that screen, AutoInput can't do that for you.