prince
prince

Reputation: 1149

How to permanently disable Wi-Fi, Bluetooth and USB Mass Storage in Android

I'm working on an Android app which requires to disable WiFi, Bluetooth and Mass Storage options.

I've seen some apps like Timeriffic and ProfileScheduler. These apps will help disable the certain features like bluetooth and WiFi. But they will only change put them on/off.

In my case I want to completely disable them and then they are not available for user.

I would like to know is there any API in Android which will allow us to completely disable the these features???

Upvotes: 4

Views: 21711

Answers (2)

Shamshid
Shamshid

Reputation: 423

These steps are to Disable WiFi:

  1. Open ES File Explorer and give Root access

  2. Go to system folder and open Build.prop using RB Text Editor (i recommend you to backup original file)

  3. Remove the below mentioned lines in Build.prop

wifi.interface=
wifi.supplicant_scan_interval=

  1. save it and reboot!!

You can notice that WiFi buttons are no longer in use!!

More details are here :)

Upvotes: 3

Sulabh Gupta
Sulabh Gupta

Reputation: 642

Not a perfect solution... but for a work around, you can listen for state of wifi. Use ConnectionManager

Whenever wifi is turned on.. You can disconnect it via code..

WifiManager wifiManager = (WifiManager)this.context.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(false);

:D

Upvotes: 2

Related Questions