How to set signal strength threshold for switching WiFi on and off? When the WiFi signal strength is low, the phone switches to a 4G
network.
When the WiFi signal strength is high, the phone switches to that WiFi
network.


This is normal behavior for any Android device and all too familiar to Android users, or to users of any WiFi enabled device in fact. But the problem I often run into is that the WiFi signal is too low to be usable, and too high to switch to 4G automatically.


WiFi signal strength 0 &lt; x &lt; 0.5 marks (bars), the phone switches to
a 4G network.
WiFi signal strength x > 0.5 marks, the phone switches to that
WiFi network.


These values are not real measurements. They are merely my own perceived points at which the phone switches between the two.

TL;DR:
Is there a way for me to optimize the auto-switching between WiFi and 4G to my own liking? Is it possible to set that threshold point manually? What I would like is to switch over to 4G as soon as the WiFi signal is below the 2 mark point.



What I am often forced to do, in order to get (usable) Internet access, is to enter the Settings menu on the phone and disable WiFi altogether in order to force my "smart" phone to switch over to 4G!

Would it not be better if the user could control the threshold at which the phone switches between WiFi and 4G? I think the default threshold is too conservative. It's set up to conserve 4G bandwidth by free-riding on available WiFi networks for as long as possible and whenever possible (available).

Devices are optimize to make use of WiFi as much as possible, due to associated data costs on 4G networks. But this is a nuisance! My Internet access is almost completely crippled for many of the WiFi networks I have access to, whenever the signal strength is below the 2 mark point. On the other hand, I have over 4 GB unused bandwidth on my carrier network, for which I have a much stronger signal, but I have to disable WiFi first in order to connect to 4G. That's not convenient when you're on the move a lot.

I have recently started using the 4G network almost exclusively. I have stopped using WiFi because I have had enough with enabling and disabling it back and forth, and having to remember to do it when I'm on the move. So I am looking for a more permanent solution to this.
This would be messy for a comment, so consider it a partial answer.

The following task can stop or disconnect a WiFi if the signal level is below your preferred level.


Create a task named "Wifi" and create following actions in it:


Code &rarr; Run Shell:


Command &rarr; echo "%WIFII" | awk '/Sig: [0-9]/ {print $2}'  
Store Output In &rarr; %Signal


Alternatively, since awk requires installation of Busybox, for non-rooted devices use the action Variable &rarr; Variable Search  to search the integer next to Sig: in the variable %WIFII and save it in %Signal.
Task &rarr; If:


%Signal Maths: Less Than INT 



Replace INT with the signal value (0-9) at which Wi-Fi should disconnect
Net &rarr; WiFi &rarr; Off | Net &rarr; WiFi Net  &rarr; Disconnect


It is up to you how you want to use this Task. 

Note: Tasker has a profile option "WiFi near" under "State" where you can select SSID and/or Signal level of WiFi in proximity.

Hint: You may try running that task with a bit more modification under an infinite loop.