Page 1 of 1

Turn off WiFi and mobile data

Posted: 04 Mar 2019 15:23
by bininga59
Hello, is there a possibility of wireless and mobile data, e.g. Turn off at 11:00 pm and turn back on at 6:00 am?

Re: Turn off WiFi and mobile data

Posted: 04 Mar 2019 16:18
by ariloc
Make two flows, where both have a Time trigger, one set at 6am and the other one at 11pm. Then after that use actions Set WiFi State and Set Mobile Datanetwork, on or off as you need it. Keep in mind the last one requires your phone to be rooted, so you can instead use Set System Setting where the setting is mobile_data1 and the value to turn on is 1, and or off is 0. To modify system setting of this type you need to grant Automagic a specific permission with your PC with adb (you can google how to install and set adb, and grant permission is described on the action help, which you can access by going to http://automagic4android.com/en/help/co ... em_setting

In base of what you said, I quickly made those flows I described to help you a bit.

Re: Turn off WiFi and mobile data

Posted: 04 Mar 2019 17:01
by bininga59
Wonderful, thank you.
Let's see if it works.

Re: Turn off WiFi and mobile data

Posted: 05 Mar 2019 06:32
by bininga59
bininga59 wrote:Wonderful, thank you.
Let's see if it works.
Has worked very well, - thanks.

Re: Turn off WiFi and mobile data

Posted: 24 Aug 2019 23:49
by tal444
Thank you so much for posting. I have this working on a Galaxy Note 9. I want data to turn off when I'm at home because sometimes the kids turn data on and somehow the WiFi isn't connected so we use gobs of data.

I understand that without routing, you can use adb to give automagic permission to change the system settings. So I executed

adb shell pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS

No error messages, so I it worked.

The action looks like this:
<action type="set_system_setting">
<useDefaultName>true</useDefaultName>
<name>Set System Setting: Global mobile_data1 to 0</name>
<settingCategory>GLOBAL</settingCategory>
<settingName>mobile_data</settingName>
<value>0</value>
<verified>true</verified>
</action>

At first, maybe I misunderstood the example, I used <settingName>mobile_data1</settingName>. That didn't work for me, but without the 1 it works fine.