Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle mobile data (on/off) (feature request) #206

Open
toxtox opened this issue Jul 31, 2016 · 3 comments
Open

Toggle mobile data (on/off) (feature request) #206

toxtox opened this issue Jul 31, 2016 · 3 comments

Comments

@toxtox
Copy link

toxtox commented Jul 31, 2016

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.

  1. Do you think it is possible to integrate the "toggle mobile data sourcecode" into LibreTasks?

Maybe you could ask Andy Boeh ( https://github.com/andyboeh ) or Toby Kurien https://github.com/tobykurien for helping you.

  1. 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:https://on"));
    sendBroadcast(intent);`

But I am not sure if you will get conflicts between the settings in BatteryFu and the trigger-signals of LibreTasks.

@toxtox
Copy link
Author

toxtox commented Aug 4, 2016

Maybe toggling mobile data is easier than I thought

https://stackoverflow.com/questions/23528824/is-there-an-adb-command-to-enable-disable-mobile-datarooted-device

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"

@biotinker
Copy link
Owner

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.

@toxtox
Copy link
Author

toxtox commented Aug 4, 2016

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants