Open toxtox opened 8 years ago
Maybe toggling mobile data is easier than I thought
alternatively you an automate a terminal shortcut with the command
su -c "sh svc data enable"
or
_su -c "sh script_with_svc_command.sh"
_
Libretasks is not currently a root application (it may someday have the option to enable root for additional actions, but not currently).
That said, the intent to toggle mobile data shouldn't be any more difficult than wifi, I can probably work this into the next release.
If you just run a terminal shortcut command launched by LibreTasks then LibreTasks should not need root. You need just a rooted phone and set the general root-access in settings to "only apps". This works especially for CM13 devices.
You could check this with the app "Sfen" 1.0. This opensource tasker app allows to run terminal shortcuts . https://github.com/lordgreg/Sfen
By the way, running terminal shortcuts would be a very mighty killer feature for LibreTasks or course. I have seen that someone else was already interested in such a feature #202 .
I have found many opensource apps for Lollipop and Marshmallow that can toggle WIFI and Bluetooth BUT only one app ("BatteryFu") that is able to toggle mobile data. Obviously the only opensource app that can toggle mobile data for my CM13 Marshmallow is "BatteryFu" https://github.com/tobykurien/BatteryFu Unfortunately BatteryFu does not offer a timetable (task list) for toggling mobile data. Sure BatteryFu toggling solution needs root but this is not a big disadvantage because there is obviously no other alternative.
Maybe you could ask Andy Boeh ( https://github.com/andyboeh ) or Toby Kurien https://github.com/tobykurien for helping you.
An alternative could be to trigger the running BatteryFu app in order to toggle mobile data. An example for a BatteryFu-Integration is shown on here, too: https://github.com/tobykurien/BatteryFu
`// turn data on
Intent intent = new Intent(); intent.setAction("batteryfu.intent.action.TOGGLE"); intent.setData(Uri.parse("data://on")); sendBroadcast(intent);`
But I am not sure if you will get conflicts between the settings in BatteryFu and the trigger-signals of LibreTasks.