-1

From browsing StackOverflow I understand how an app gets root privileges (the "su" command) but does the app need root access to do the following commands?

  1. Turn Bluetooth On/Off
  2. Turn WiFi On/Off
  3. Turn Mobile Data On/Off

The reason I ask is that for a unit of my studies, I am wanting to create a basic AI using either text input or the google api for speech recognition. I would like it to be able to control phone functions to make a true "assistant in your pocket". Code samples will be useful but a simple text explanation will be more than sufficient.

I apologize if this has been asked before but searching didn't find my question.

Many Thanks in Advance, James

JWassall
  • 21
  • 1
  • 6

1 Answers1

0

You don't need root for those operations, you just need to have the permissions for those actions in the application manifest.

<uses-permission android:name="android.permission.BLUETOOTH" />

<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />

Mikel
  • 1,581
  • 17
  • 35