Skip to main content
New Member
September 5, 2023
Solved

Android Management API - How to enact a WiFi disabling policy ?

  • 8 replies
  • 237 views
  • Translate All • Beta, powered by Gemini

I want a json implementation of a policy that will disable wifi for the device

Moombas
MoombasAnswer
Level 4.4: KitKat
September 6, 2023

What do you mean with "i want"?

I mean you can do it via vendors OEM config app (if available) or if you use an MDM look at it'S settings or look at this documentation: https://developers.google.com/android/management/reference/rest/v1/enterprises.policies?hl=en#deviceconnectivitymanagement

 

DeviceConnectivityManagement

Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.

JSON representation
 
{
  "usbDataAccess": enum (UsbDataAccess), 
"configureWifi": enum (ConfigureWifi),
"wifiDirectSettings": enum (WifiDirectSettings),
"tetheringSettings": enum (TetheringSettings)
}
Fields
usbDataAccess

enum (UsbDataAccess)

Controls what files and/or data can be transferred via USB. Supported only on company-owned devices.

configureWifi

enum (ConfigureWifi)

Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks.

wifiDirectSettings

enum (WifiDirectSettings)

Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above.

tetheringSettings

enum (TetheringSettings)

Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering.

Android Enterprise Expert

8 replies

Moombas
MoombasAnswer
Level 4.4: KitKat
September 6, 2023

What do you mean with "i want"?

I mean you can do it via vendors OEM config app (if available) or if you use an MDM look at it'S settings or look at this documentation: https://developers.google.com/android/management/reference/rest/v1/enterprises.policies?hl=en#deviceconnectivitymanagement

 

DeviceConnectivityManagement

Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.

JSON representation
 
{
  "usbDataAccess": enum (UsbDataAccess), 
"configureWifi": enum (ConfigureWifi),
"wifiDirectSettings": enum (WifiDirectSettings),
"tetheringSettings": enum (TetheringSettings)
}
Fields
usbDataAccess

enum (UsbDataAccess)

Controls what files and/or data can be transferred via USB. Supported only on company-owned devices.

configureWifi

enum (ConfigureWifi)

Controls Wi-Fi configuring privileges. Based on the option set, user will have either full or limited or no control in configuring Wi-Fi networks.

wifiDirectSettings

enum (WifiDirectSettings)

Controls configuring and using Wi-Fi direct settings. Supported on company-owned devices running Android 13 and above.

tetheringSettings

enum (TetheringSettings)

Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering.

Translate • Beta, powered by Gemini
Android Enterprise Expert
jasonbayton
Level: 4.1: Jelly bean
September 6, 2023

If you're completely unfamiliar with building policies in AMAPI, the quickstart is a good place to begin

 

https://colab.research.google.com/github/google/android-management-api-samples/blob/master/notebooks/quickstart.ipynb

 

You're looking to set wifiState: 

 

https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#wifistate

Translate • Beta, powered by Gemini
Moombas
Level 4.4: KitKat
September 6, 2023

Hm with disable i thought maybe more like he really want to disable it and not turning it off but now he has both possibilitys linked 😉

Translate • Beta, powered by Gemini
Android Enterprise Expert
New Member
September 6, 2023

Thankyou for linking me to the REST Resource. I wanted to create a policy for disabling WIFI permanently for my organizations devices and I achieved it by setting wifiConfigDisabled to true

Translate • Beta, powered by Gemini
Lizzie
Community Manager
September 6, 2023

Hey @ashjaymohsin, just @ mentioning you here in case you missed the replies from @Moombas and @jasonbayton.  😀 Thanks

Translate • Beta, powered by Gemini
Welcome to the Community everyone!