How can i toggle off Mobile Data automatically at night (11pm - 6am).
Tasker doesnt allow toggling mobile data with my OP 3T (Android 7)?
I tried AutoInput but it doesnt work.
Any ideas ?
i also tried an app called "sound profile" and IFTTT
I use AUTOMATE by Llamalab to do just that and other tasks. I have 5 main flows running,
1- Airplane mode 11pm to 7am.
2- Turn mobile data ON or OFF according if WiFi connected or not
3- If mobile data enabled switch to 2g when screen OFF and back to 3g/4g when screen unlocked
4- Only enable NFC when phone unlocked
5- Turn OFF bluetooth if no device connected
Its easy to learn its modular flow system and plenty of user flows shared through the app.
Download app from playstore called leandroid
it makes you able to do exactly that but not only for mobile data but for gps, wifi, bt, etc
Is this also available with a non root device?
Related
Recently, even with "background data" disabled, my Nexus One randomly use EDGE data while it sleeps. This become the problem since when there is ongoing data transfer, I won't be able to receive calls. I didn't notice this until my friends told me that they couldn't reach me.
Is there an app or an option in Android/Nexus One that I can completely turn off mobile data access until needed? I tried APNDroid, but after I turn it back on, mobile data access won't be available until the phone is rebooted.
You can't use data and voice calls at the same time? That's strange. What carrier are you using?
I'm not actually sure if there is an easy way to turn data on and off completely, but you might be able to turn syncing off and then go through all of your applications and make sure they don't automatically update or stay logged in like g-chat. I think disabling syncing only has an effect on the stuff listed under Accounts & sync settings in the Settings menu, (Google and Facebook on the stock ROM).
I'm on T-Mo.
When you're on GSM network, unless BOTH carrier & handset supports some special feature (don't remember the name), concurrent voice/data is impossible. To date, I've only seen one Nokia phone supports the feature.
<rant>
Going through every single app to make sure that it doesn't use data is a pita and not guarantee that no data will be used.
Since N1 WCDMA reception is crappy, I have to rely on GSM quite a bit. Since day 1, I had background data & auto sync disabled (only enabled when needed). --- For some reason, "background data" seems to apply to system/google-related app, but doesn't apply to 3rd-party app.
This sucks big time since it is phone first, computer second, so it kind of annoy me that background GSM data prevents me from receiving calls.
</rant>
I found a way to completely disable/enable mobile data access on N1. It's a bit clumsy, but it works.
Go go Phone, dial "*#*#4636#*#*" to get into N1 Testing app.
Tap "Phone Information"
Tap menu -> more -> "Disable data connection"
Tap menu -> more -> "Disable data on boot" (just to make sure it's not enabled after you reboot the phone)
then... "GSM disconnects" should read "State: inactive ...... fail because No Error"
Some would suggest changing APN name manually or using widgets. But according to Testing app, you will still be connected to data network. Connection attempts will be made over mobile data network, but they won't go through. This doesn't guarantee 100% no data requirement. It just prevents you from hopping on the internet.
Seems like a lot of work to turn off data I agree. I'm just lucky I'm on a carrier that uses another carrier's net so it's roaming all the time. All I have to do is disable "data roaming" and data is off.
Toggle data is what i'm using - it's a free widget button to turn 3G (mms optional) on and off just like the Power widget. I've also seen another widget with a different name, but that was a black button and Toggle data is white.
Thanks. This seems to have the same effect as disabling data via Testing app.
wind0zer said:
Toggle data is what i'm using - it's a free widget button to turn 3G (mms optional) on and off just like the Power widget. I've also seen another widget with a different name, but that was a black button and Toggle data is white.
Click to expand...
Click to collapse
try juice defender from the market. it can stop apn connections periodically or totally stop it
By default, I keep my mobile data on. When I switch Wifi on, it would override the mobile data, and when I switch Wifi off, it would resume mobile data, and this is working perfectly without needing me to manually switch mobile data on/off. I guess this is the general behavior of Android device.
However, recently I tried some apps to switch mobile data on/off, and it must be one of these apps which changed the network connectivity priority. What happen now is that when my mobile data is on, I cannot turn on Wifi (well, wifi is on, but it won't connect to any ssid, and just show Disabled), so i must manually switch the mobile data off that I can use Wifi.
This so annoying, and I have been searching for solutions but can't find any.
Since those apps I tried do not require root access, I guess i could revert to originally settings without root, but I couldn't find any options in system settings about network connectivity priority.
Experts please help!
After some more search, I found that one of these apps must have used "setNetworkPreference" to change the preference from TYPE_WIFI to TYPE_MOBILE.
Ref.
http://developer.android.com/refere...ctivityManager.html#setNetworkPreference(int)
But i'm not android programmer, i have no idea how I can reset it to default.
Any help would be much appreciated.
Android Marshmellow + rooted.
I'm using (like so many) a few profiles/taks to switch from Mobile Data to Wifi when i get home and back when i leave home. Works pretty nice but... not all the time.
The reason behind this is the difference on how Wifi and Mobile Data are activated.
If changed both manually (via the drop down menu) both act as a toggle.
But within tasker this behaviour changes. Wifi has an On / Off option, Mobile Data has to but that doesn't work anymore since Google changed the activation for Mobile Data which means that you can only set it with the help of Active Input and that turns it into a toggle.
And this creates a syncronisation problem between Wifi and Mobile Data.
I'll explain the difference:
If i set Wifi to ON Wifi goes ON.
If i set Wifi again to ON, Wifi stays ON. It will only go OFF when i set it to OFF.
It behaves as a physical switch.
Mobile Data however does not.
If i activate Mobile Data through Active Input and it's OFF, it will go ON. And when it's ON it will go OFF.
It behaves a toggle.
Now this works OK as long as everything is in sync.
If Mobile Data is ON and i reach home, Wifi is turned ON, i get the connected signal and Mobile Data is turned OFF. Same goes the other way, if i leave home, Wifi connection is lost and Wifi is turned Off. When the connection is lost Mobile Data is turned On again. Works nice.
But this can get out of sync because of the switch/toggle behaviour.
Example:
If i'm home, Wifi is ON and Mobile Data is OFF. If i turn Wifi OFF manually , the connection is lost and Mobile Data comes ON. If i turn Wifi back ON, Mobile Data goes OFF again.
But the other way there is a problem. If i'm not home and turn Mobile Data OFF somewhere and reach at home, tasker sees this, turns on Wifi and "toggles" Mobile Data to be OFF but since it's a toggle action, Mobile Data will come ON instead and both are then ON. And from then on the nice syncronisation between Wifi and Mobile Data is gone.
This manual override (like i like to call it) also doesn't update the variable i use which is logical since the Mobile Data wasn't "toggled" through Tasker.
I tried to solve this with a double variable check together with a variable i set when Mobile Data is connected (2G,3G,or 4G) and then toggle Mobile Data according to this and set/reset the variables but while this should work better in theory, it still doesn't work all the time because indoors, Mobile Data connection can be lost and then the Mobile Data toggles again to a state i don't want again setting a desyncronisation between Wifi and Mobile Data. In fact, due to this the syncronisation has become more unstable. So i removed the Mobile Data connected part again.
Questions:
- Is there a way to make Mobile Data work as a switch instead of a toggle?
- If not, is there a way to detect is the Mobile Data button has been touched (which i could then use in a variable)?
I'm using shell commands to switch mobile data on/off.
If your selinux is permissive, simply run a shell command with this:
Code:
svc data enable;
or
Code:
svc data disable;
If your selinux is enforcing, you need to add two lines, so it looks like this:
Code:
setenforce permissive;
svc data enable;
setenforce enforcing;
and respectively
Code:
setenforce permissive;
svc data disable;
setenforce enforcing;
Needless to say, you need root access for this.
I'm afraid that's currently above my head...
To add a shell command:
Code > Run Shell
Tick "root"
Put the codes from above in "Command"
Sukarn said:
To add a shell command:
Code > Run Shell
Tick "root"
Put the codes from above in "Command"
Click to expand...
Click to collapse
Exactly. [emoji106]
If i do that, can you then explain at least what it does exactly?
I guess it will turn on/off mobile data but on what basis?
How do these commands know when to turn it on or off depending on my wifi state?
What does " if your selinix is enforcing" means?
Edit: Got it partly working with the shell commands. Mobile data doesn't always turn off when wifi comes back on and is connected. It still can get out of sync.
It does not check the state of the mobile data if i interact and turn it on/off manually because it doesn't seem to know in what state is after playing around with it manually.
Also, tasker sometimes seems to get stuck somewhere in the middle of the code for disabling the mobile data.
Need to look a bit more into why tommorow...
Update:
Got it fully working with the shell commands and sync between Wifi and Mobile Data seems OK (for now at least).
I'm using the settings get global mobile_date command to put the status into a variable and then work with this and the wifi status variable to toggle Mobile Data on and off.
One thing i haven't found yet is what the settings get mobile_data exactly returns, the state of the toggle button in the notification screen or the state of the mobile data being connected?
Does anyone know of an app that will automatically turn off mobile data when i'm successfully connected to a WiFi connection have have internet access through it.
The app should do something like this...
1. Check for WiFi connection
2. If WiFi = connected, then test WiFi connection
3. If connection = Good, then turn off Mobile Data, else leave Data connection ON
If you suggest Tasker, then you better follow it up with a full write-up on how to set it up on Tasker.
I believe (someone will correct me if I'm wrong) that Android is programmed to use wifi when it's available, even though your data connection looks as if it's on.
If you're not happy with that, Automate It should be able to do something for you. I have Automate It Pro set to turn off wifi & data at midnight, for example, to avoid the nuisance of emails pinging me in the middle of the night. And it switches wifi & sync on at 09:00 each day. Very useful tool, simpler than Tasker, so no tutorial from me...
There are a few Automate apps in the Play Store - it's this one:
https://play.google.com/store/apps/details?id=AutomateIt.mainPackage
This free version allows you 3 (as I recall) triggers - if you need more it's not too expensive to buy Pro.
I use RadioControl to handle that for me.
https://play.google.com/store/apps/details?id=com.nikhilparanjape.radiocontrol&hl=en
It requires root, and it's not perfect. But it works well enough for me.
[NG]Owner
Try smart radio xposed module.
pr0ndigy said:
Does anyone know of an app that will automatically turn off mobile data when i'm successfully connected to a WiFi connection have have internet access through it.
The app should do something like this...
1. Check for WiFi connection
2. If WiFi = connected, then test WiFi connection
3. If connection = Good, then turn off Mobile Data, else leave Data connection ON
If you suggest Tasker, then you better follow it up with a full write-up on how to set it up on Tasker.
Click to expand...
Click to collapse
Tasker does it pretty simply, but it needs root access..
Set up (2) tasks - I called mine Data Off & Data On. You will need to select "Net/Mobile Data" and then set "On" or "Off" respectively. Next set up your profile. Select "State/Net/Wifi Connected", and leave everything empty and save. This will trigger the profile when any wifi is connected. (Optionally, you could set it to your home or work wifi, etc). Your "task" will be "Data Off", then add an "exit task" for "Data On" (by long pressing the Data On and selecting "exit task").
dahawthorne said:
I believe (someone will correct me if I'm wrong) that Android is programmed to use wifi when it's available, even though your data connection looks as if it's on.
Click to expand...
Click to collapse
^^^^ This. Android has done this for years. Some devices have the ability to keep mobile data on with wifi, but those usually default to OFF.
Note in the screenshot below that my Cellular network state (mobile data) is "Disconnected"
Pkt_Lnt said:
^^^^ This. Android has done this for years. Some devices have the ability to keep mobile data on with wifi, but those usually default to OFF.
Note in the screenshot below that my Cellular network state (mobile data) is "Disconnected"
Click to expand...
Click to collapse
Interestingly, I bring up the same screen on my phone (when connected to wifi) and it shows cellular is still connected??
jbaumert said:
Interestingly, I bring up the same screen on my phone (when connected to wifi) and it shows cellular is still connected??
Click to expand...
Click to collapse
Do you have a ROM that has that option and it is enabled?
Pkt_Lnt said:
Do you have a ROM that has that option and it is enabled?
Click to expand...
Click to collapse
Running SIX ROM - Just checked, that option is disabled in the Dev Settings / connected to good wifi / and cellular is active...
¯\_(ツ)_/¯
Now it is a question for that rom dev.
Hey..
I have setup a project to system lock phone (deactivate fingerprint login etc.) if it looses connection to mobile networks. This is extra safety for my in the event someone gets hold of it.
To accomplish this I've setup a profile with the state 'Mobile Network', selected all network modes and used the 'any' trigger and inverted to make trigger whenever the state have no mobile networks. This is tested and works but..
.. whenever WIFI is on it doesn't trigger. If you disable WIFI or it looses WIFI connection it triggers.
Is this bad behavior or am I missing something?
The project in whole still works since an active WIFI connection would give me access to my phone and therefore a system lock is only needed in the event I cant reach it, ie. no WIFI and mobile data.
Thank you.