Automatic switching on of wifi is quite horrible and worrisome. I guess you might have experienced this issue or you might have a friend who has. It is a general and a known issue to the end users of Android operating system which is you and I.
There might be some hopes to solving this issue if your wifi keeps turning on by itself. Below are author’s research and experiences to nailing down this very issue to minimum. Though, I have experienced this multiple times.
1. Buggy System upgrades
System upgrades is a good practice. System updates turns your device to latest OS builds and error corrections. You might download a buggy system upgrades which are sometimes beta version of the main updates.
Solution: Always make a backup of your android OS before upgrading to a higher version.
2. Flashing of Custom Roms
Customs roms are modified and ported stock OS. It can be from a different device manufacturer. Lets say, I use an Infinix hot note 2 running Android Lollipop and kernel 3.4.5 but I just flashed a Lenovo lemon 3 running Android M (marshmallow) with kernel 3.4.5. Wifi is a hardware infrastructure unlike what Android version you use. Having flashed a ported Rom from another phone manufacturer might not fully accept the hardware layer specifications and these cause bugs. Somehow Bluetooth, data and WiFi might be affected.
Solution: It is always recommended to use custom ROMs from top developers with relatively high supports, high user reviews and less bugs.
3. Connection optimizer :
It automatically turns on wifi to search for open connections. It is an inbuilt call up app. If you are using a T mobile phone or MediaTek device, this function is not available. You could disable connection Optimizer but I wouldn’t recommend that for you. Why? I wouldn’t love to aid you void your device warranty.
Solution: Goto phone settings > more… > mobile networks > untick connection optimizer
For T mobile, open T mobile my Account app , options, under notification uncheck the box marked “display wifi manager notifier”. Then, under “connection assistant”, select “open wifi manager”, now uncheck the box for manage wifi connection.
If you are using Tecno, infinix, etc, keep reading
4. Infested apps sometimes referred to as virus
You can call them virus because they are made to spy and steal. These apps are normally downloaded from unknown sources. They might be some cracked premium or pro apps by the bad guys. What they normally do is they insert some kind of permissions to either access your location, gmail details, contacts, google wallet account details etc and send to the developers email address. For these operating to take effect, data connection is required. But when data is nowhere to be found, it looks for a free open wifi spot. This might be a kind of donation to them for having let you install a premium app for free.
Solution: Avoid installing paid apps that are cracked. You can just help to support a developer for a lifetime donation at most N200 or $1.
5. Auto enabling apps like weather, news, battery saver apps
Some apps are designed to auto switch wifi incase whenever data is not enabled. This is required to enable feeds updates in some certain app category like news and weather apps.
For battery saver apps, custom profiles may require wifi to be enabled at any given intervals. Lets say, you are running battery defender or juicedefender, and your current profile switches wifi on which you might be ignorance of.
Solution: Always download apps that you understand well about it.
This happens whenever your Operating system has gotten enough app data to control.
You can download wifi switch by kostya vasilyer. This apps turns off wifi on selected apps.
You can as well disable permission for some apps in your phone settings at data usage under wlan tab.
If the problem persist, you can consider factory resetting your device or contacting a phone techy for ROM replacement.