How can I disable GPS on the device using the Knox SDK?

In order to disable location on your device, you can use the setLocationProviderState API method.

This method was part of Knox Standard SDK since MDM 2.0 and is now part of the Knox SDK.

In Android, there are three types of location providers: gps, network, and passive.

If you want to block finding location using gps, call setLocationProviderState(“gps”,false).

If you want to completely block location feature, then you must block all three location providers.