Active the Data

  • Replies:1
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Sep 9, 2016, 2:07:15 PM via Website

Hi guys,
I'm searching how to active the Data of the mobile (3g/4g) from the android application.
I have searching but, I just found how to check if the Data are enable or not.

So i'm asking you, is'it possible ?

ps : it is not for an application who will be on the AndroidStore, but it's just for my personnal application.
I precise because i don't know if it's "legal" to active the Data from the application, but as it just for me, I don't really matter.

  • Forum posts: 27

Sep 9, 2016, 7:23:09 PM via Website

Unless phone is rooted, you can't do it because of a security precaution.
With root access, you can execute adb command to enable or disable mobile data:
To enable mobile data:

$ adb shell svc data enable

To disable mobile data:

$ adb shell svc data disable

Recommended by NextPit