When you are in a Wi-Fi location, your phone automatically connects to it even if you have not used your phone. But often forgetting this type of active connection when the device is not in use can result in running out of battery power quickly.
By default, Android does not have an effective mechanism for automatically disabling Wi-Fi. This type of connection is enabled even though it's not connected to any network, meaning your phone's battery power is meaningless. Here's how to turn off Android Wi-Fi Automatically in some situations.
As mentioned above, the task of turning off Wi-Fi automatically does not come by default in the system. That's why you'll need a free app available on Google Play called "Better Wifi On / Off"You must download it on your phone.
When you first open the program, click "Deny" and then click the icon indicated in the image below to access your options;
Scroll down the options list and enable Expert Mode;
At this point, you will return to the application's main screen. So, touch the icon again to access the program's "Options" and check the "Stop when screen off" option.
Ready! At this time, each time your phone is locked or your monitor is turned off, Wi-Fi will be disabled, saving some device battery. Finally, you can also leave the "Start at boot" option selected, which starts the application with the system so that it does not have to be configured manually each time the phone is turned on.