Technology Window

Simplifying Technology
Menu
  • how-to
  • About Me
  • Contact Me
  • Privacy Policy

How to turn off mobile data automatically when on Wi-Fi in Android

Ritesh Nishar January 23, 2017

We all know that Android takes care of this task internally. However, it not really turns off the mobile data completely. The result of that is there is always some battery draining behind the scenes. Keeping mobile data or Wi-Fi ON unnecessarily drains your phone’s battery at quite good rate.

So is there any workaround to automate this task? Well, there is but not as simple as you might have thought. To turn off the mobile data automatically, some app will have to dig into the system. You will first need a rooted Android phone to make this happen.

turn off mobile data automatically when on wifi in android

Automation of various tasks is the need of the hour because there are so many functions to deal with in an Android phone. Similarly turning off the mobile data when on Wi-Fi is one such task which needs to be automated. So here is a step by step guide to that.

Turn off mobile data automatically when on Wi-Fi

Step 1:  Install Tasker app from here.

Step 2: Grant the root permission to Tasker app.

Step 3: Open Tasks and create a new shell command task by choosing “Run Shell” as an action. Give it a name as “Set Off” or something that you prefer.

disable mobile data shell commandWrite command as “svc data disable” and don’t forget to use root.

Step 4: Similarly create a new shell command task and give it a name “Set On”.

enable mobile data shell command

Write command as “svc data enable” and use root too.

Step 5: Go to Profiles and create “Wifi Connected *,*,* ” profile.

Step 6: Assign above “Set Off” as an entry task and “Set On” as an exit task. Now keep the profile active.

create profile wifi connected in taskerNow whenever your phone connects to Wi-Fi network, the mobile data will get turned off automatically.

You can also restrict this to any specific Wi-Fi network too. The Wifi connected profile provides you the optional options such as SSID, MAC and IP.

Every Wi-Fi enabled router has all these options. Just mention any of the three fields and you are good to go.

Although Tasker has inbuilt task to turn off mobile data, it may not work on all devices. Especially for the devices running on OS 5.0 and plus. i.e. Lollipop and further.

There is another app called “secure settings plugin” which could toggle mobile data. However, the app is no longer updated by the developer. It fails to match the latest OS updates.

So you will have to run shell commands in order to get this done. Tasker has an ability to automate various tasks that you would always imagine an Android phone could do.

Thus, you can turn off mobile data automatically when connected to any Wi-Fi. It eases your task of going to the notification panel and turning it off whenever not required. If you have any alternate method or any comments then share them below.

Update: You can also use Droid Automation to turn off mobile data automatically when on Wi-Fi. Since Tasker is a paid app, you can use this app for a free solution. You will have to create two profiles using the inbuilt triggers.

This app also requires root access and it does exactly same thing as above. However, it is not as effective as the former one. Sometimes you will have to manually run the profiles.

Prev Article
Next Article

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • How to send bulk messages on WhatsApp or WhatsApp Business
  • How to change the color of your WhatsApp
  • How to install OrangeFox recovery and root Redmi Note 5
  • Best Android apps to earn Free Cryptocurrencies
  • How to check last seen on WhatsApp even if it’s hidden

Popular Posts

  • How to install Xposed Framework in Android 4.0.3 to 4.4 4 comments
  • How to fix sysmenu.dll error after Windows 8.1 upgrade 3 comments
  • How to download Facebook chat messages to PC 3 comments
  • How to use PC keyboard with Android phone over Wi-Fi or USB 3 comments
  • 10 reasons to move to GoDaddy Managed WordPress Hosting 2 comments

Subscribe




Technology Window

Simplifying Technology
Copyright © 2023 Technology Window