Mobile network state includes WIFI - Tasker Tips & Tricks

Hey..
I have setup a project to system lock phone (deactivate fingerprint login etc.) if it looses connection to mobile networks. This is extra safety for my in the event someone gets hold of it.
To accomplish this I've setup a profile with the state 'Mobile Network', selected all network modes and used the 'any' trigger and inverted to make trigger whenever the state have no mobile networks. This is tested and works but..
.. whenever WIFI is on it doesn't trigger. If you disable WIFI or it looses WIFI connection it triggers.
Is this bad behavior or am I missing something?
The project in whole still works since an active WIFI connection would give me access to my phone and therefore a system lock is only needed in the event I cant reach it, ie. no WIFI and mobile data.
Thank you.

Related

Keep cellular data active when connected to WiFi

So I can't seem to find anything that answers this anywhere.
I have some remembered WiFi networks which are open but require me to hit OK on the login page once I connect in order to use the internet. If my phone is in my pocket it will connect to these networks but not be able to access the internet until I go through the login procedure.
I notice though that my phone drops the cellular data connection as soon as it connects to the network giving me a large amount of time with no data at all. I have searched high and low for the setting that will keep cellular data permanently active but I cannot find it. When I look in settings I see:
Mobile data
Use my data plan when Wi-Fi isn't available.
If I tap that I see no option to change anything that would always keep the data connection alive. I see only the following
Data roaming
Data roaming sound
Access point names
Network mode
Network operators
In Power I have Power saver switched Off and Sleep mode switched Off.
Does anyone know how I can enable this?
Thanks

Help!! Wifi vs Mobile Data priority

By default, I keep my mobile data on. When I switch Wifi on, it would override the mobile data, and when I switch Wifi off, it would resume mobile data, and this is working perfectly without needing me to manually switch mobile data on/off. I guess this is the general behavior of Android device.
However, recently I tried some apps to switch mobile data on/off, and it must be one of these apps which changed the network connectivity priority. What happen now is that when my mobile data is on, I cannot turn on Wifi (well, wifi is on, but it won't connect to any ssid, and just show Disabled), so i must manually switch the mobile data off that I can use Wifi.
This so annoying, and I have been searching for solutions but can't find any.
Since those apps I tried do not require root access, I guess i could revert to originally settings without root, but I couldn't find any options in system settings about network connectivity priority.
Experts please help!
After some more search, I found that one of these apps must have used "setNetworkPreference" to change the preference from TYPE_WIFI to TYPE_MOBILE.
Ref.
http://developer.android.com/refere...ctivityManager.html#setNetworkPreference(int)
But i'm not android programmer, i have no idea how I can reset it to default.
Any help would be much appreciated.

Auto Turn Off Mobile Data When Connected to WiFi

Does anyone know of an app that will automatically turn off mobile data when i'm successfully connected to a WiFi connection have have internet access through it.
The app should do something like this...
1. Check for WiFi connection
2. If WiFi = connected, then test WiFi connection
3. If connection = Good, then turn off Mobile Data, else leave Data connection ON
If you suggest Tasker, then you better follow it up with a full write-up on how to set it up on Tasker.
I believe (someone will correct me if I'm wrong) that Android is programmed to use wifi when it's available, even though your data connection looks as if it's on.
If you're not happy with that, Automate It should be able to do something for you. I have Automate It Pro set to turn off wifi & data at midnight, for example, to avoid the nuisance of emails pinging me in the middle of the night. And it switches wifi & sync on at 09:00 each day. Very useful tool, simpler than Tasker, so no tutorial from me...
There are a few Automate apps in the Play Store - it's this one:
https://play.google.com/store/apps/details?id=AutomateIt.mainPackage
This free version allows you 3 (as I recall) triggers - if you need more it's not too expensive to buy Pro.
I use RadioControl to handle that for me.
https://play.google.com/store/apps/details?id=com.nikhilparanjape.radiocontrol&hl=en
It requires root, and it's not perfect. But it works well enough for me.
[NG]Owner
Try smart radio xposed module.
pr0ndigy said:
Does anyone know of an app that will automatically turn off mobile data when i'm successfully connected to a WiFi connection have have internet access through it.
The app should do something like this...
1. Check for WiFi connection
2. If WiFi = connected, then test WiFi connection
3. If connection = Good, then turn off Mobile Data, else leave Data connection ON
If you suggest Tasker, then you better follow it up with a full write-up on how to set it up on Tasker.
Click to expand...
Click to collapse
Tasker does it pretty simply, but it needs root access..
Set up (2) tasks - I called mine Data Off & Data On. You will need to select "Net/Mobile Data" and then set "On" or "Off" respectively. Next set up your profile. Select "State/Net/Wifi Connected", and leave everything empty and save. This will trigger the profile when any wifi is connected. (Optionally, you could set it to your home or work wifi, etc). Your "task" will be "Data Off", then add an "exit task" for "Data On" (by long pressing the Data On and selecting "exit task").
dahawthorne said:
I believe (someone will correct me if I'm wrong) that Android is programmed to use wifi when it's available, even though your data connection looks as if it's on.
Click to expand...
Click to collapse
^^^^ This. Android has done this for years. Some devices have the ability to keep mobile data on with wifi, but those usually default to OFF.
Note in the screenshot below that my Cellular network state (mobile data) is "Disconnected"
Pkt_Lnt said:
^^^^ This. Android has done this for years. Some devices have the ability to keep mobile data on with wifi, but those usually default to OFF.
Note in the screenshot below that my Cellular network state (mobile data) is "Disconnected"
Click to expand...
Click to collapse
Interestingly, I bring up the same screen on my phone (when connected to wifi) and it shows cellular is still connected??
jbaumert said:
Interestingly, I bring up the same screen on my phone (when connected to wifi) and it shows cellular is still connected??
Click to expand...
Click to collapse
Do you have a ROM that has that option and it is enabled?
Pkt_Lnt said:
Do you have a ROM that has that option and it is enabled?
Click to expand...
Click to collapse
Running SIX ROM - Just checked, that option is disabled in the Dev Settings / connected to good wifi / and cellular is active...
¯\_(ツ)_/¯
Now it is a question for that rom dev.

Question Bug - Wi-Fi advanced setting "Switch to mobile data" nonfunctional, any others have this?

Hi:
My S21 Ultra is the T-mobile variant, in the US.
The Wi-Fi advanced setting for "Switch to mobile data" is nonfunctional, because it has no effect when turned on.
I'm hoping that others can verify this problem: When you are connected to a non-functional Wi-Fi signal (e.g., your phone displays an exclamation point (!) next to the Wi-Fi signal strength indicator), your phone should still be able to access the internet by switching to mobile data, when you have this advanced setting turned on.
However, with my phone, I *CANNOT* access the internet when I connect to a non-functional Wi-Fi signal, whether I turn on or turn off the "Switch to mobile data" advanced Wi-Fi setting.
I'm hoping others can confirm the same issue, so we can escalate as a bug that Samsung can fix. Or maybe somehow it's an issue specific to the T-mobile USA variants of the S21 Ultra?
Anyway, I'm guessing most people don't encounter this bug, because usually you are on a functional Wi-Fi signal. But in my situation, I *NEED* to be able to connect to a non-functional Wi-Fi signal, and access data through the mobile/cellular tower connection. The reason is because that's the only way I can update the firmware on my dashcam. My phone connects to the dashcam via Wi-Fi. That works, and the app can view the dashcam etc. But the app also needs a data connection to download a firmware update for the dashcam. But when I'm connected to the dashcam via Wi-Fi, the dashcam does not provide internet. So I'm stuck because the S21 Ultra *WON'T* access the internet when connected to the dashcam via Wi-Fi, because the "Switch to mobile data" setting does not work and is ignored, so the phone has no data connection whenever I connect to my dashcam.
I figure, if T-mobile doesn't allow this, then they should remove the setting as an option. Why include the setting if it's simply ignored and nonfunctional?
There are some added wifi settings in the developer mode like, wifi scan throttling and wifi safe mode, have you looked into these? I don't have any wifi problems on my S21U unlocked phone, not branded.
In my developer options, Wi-Fi safe mode is off, and Wi-Fi scan throttling is on.
But the issue is my phone refuses to connect to cellular data, even though I tell the phone to please connect to cellular data when the Wi-Fi is unreliable.
I'm not sure that the Wi-Fi specific options in developer mode would cause the phone to refuse to connect to cellular data.
Are you able to connect to an unreliable Wi-Fi, and test whether your phone can automatically receive info via cellular data *WHILE* you are still connected to the unreliable Wi-Fi? You can simulate an unreliable Wi-Fi if you have a modem connected to your Wi-Fi router, and turn off the modem but leave the Wi-Fi router powered on with no internet.
Also, can you check your developer setting for "Mobile data always active"? Is that on or off for you? I don't want to turn on that setting, because I want the phone to save battery and turn off mobile data when I'm connected to a reliable Wi-Fi. The notable setting for me is in advanced Wi-Fi, where the phone can "Switch to mobile data *ONLY* when the Wi-Fi is unreliable and doesn't provide data.

Question Any luck with Intelligent Wi-Fi "switch to mobile data" when WiFi connection is slow or unstable?

Can anyone help me get this function working? Or is it a fake/useless/buggy function that serves no purpose but is included in the settings just for cosmetic reasons?
Under settings, connections, Wi-Fi, ..., Advanced, "Switch to mobile data" turned ON
But whenever I try to use my Wi-Fi to connect to my Wi-Fi dashcam, my phone reports there is no network and I'm unable to use the dashcam's options that require internet. I'm connected to a mobile network with full signal.
Is there something about my phone being confused on the Dashcam wifi?
My older LG G6 phone has no problem connecting to the Wi-Fi dashcam while using mobile network, but Sprint is about to shut off that phone's mobile network so I'll be out of luck when I need to rely exclusively on my retarded Samsung Galaxy S21 Ultra that is not able to get this Intelligent Wi-Fi to actually work.
is it bugged or am I doing it wrong on the Samsung?
To clarify, our phones have a setting that I believe has no effect. I cannot tell if my phone is broken or if the setting has no effect for *all* S21 Ultras.
The setting is called Intelligent Wi-Fi "switch to mobile data," when WiFi connection is slow or unstable.
You can find it under settings, connections, Wi-Fi, ..., Advanced, "Switch to mobile data" turned ON
When I turn on my setting for this feature, the feature has no effect because anytime I connect to a dead Wi-Fi signal, my phone reports there is no internet, despite having full bars 4G/5G cellular signal. The only way to access the internet is to turn off Wi-Fi in this situation. The setting should make it so you can still use the mobile/cellular network regardless of your Wi-Fi status.
Hey there, I think I have an idea what you mean. I'm sure you can setup a bixby routine to turn off wifi. Probably need another trigger to turn the wifi on such as a location based trigger
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Unfortunately, I haven't experienced this on an iPhone as it disconnect the wifi once it's very slow and unstable. Maybe play around with bixby routines?
Let me know if you need clarification
KingFatty said:
To clarify, our phones have a setting that I believe has no effect. I cannot tell if my phone is broken or if the setting has no effect for *all* S21 Ultras.
The setting is called Intelligent Wi-Fi "switch to mobile data," when WiFi connection is slow or unstable.
You can find it under settings, connections, Wi-Fi, ..., Advanced, "Switch to mobile data" turned ON
When I turn on my setting for this feature, the feature has no effect because anytime I connect to a dead Wi-Fi signal, my phone reports there is no internet, despite having full bars 4G/5G cellular signal. The only way to access the internet is to turn off Wi-Fi in this situation. The setting should make it so you can still use the mobile/cellular network regardless of your Wi-Fi status.
Click to expand...
Click to collapse
I believe you need to look into developer options, then turn on the "Always on mobile data" option (not sure of the wording)
mpore14 said:
Hey there, I think I have an idea what you mean. I'm sure you can setup a bixby routine to turn off wifi. Probably need another trigger to turn the wifi on such as a location based trigger
View attachment 5646679
Unfortunately, I haven't experienced this on an iPhone as it disconnect the wifi once it's very slow and unstable. Maybe play around with bixby routines?
Let me know if you need clarification
Click to expand...
Click to collapse
No, you misunderstood the problem.
Here is the problem: how can you maintain a network connection to the cellular network, while still connected to a Wi-Fi signal that is poor/spotty or otherwise has no internet?
The problem is I *NEED* to remain connected to a Wi-Fi signal that has no internet. The phone is too stupid to automatically use the cellular network, even though there is a setting that literally says the phone can do this.
When I turn on the setting the phone doesn't behave as though the setting is turned on.
You can simulate this connection arrangement, and I can explain how, if you are willing to try it?
tiliarou said:
I believe you need to look into developer options, then turn on the "Always on mobile data" option (not sure of the wording)
Click to expand...
Click to collapse
I will try this today after work.
The Developer Options includes this setting: Mobile data always active
The developer option is not ideal because I don't want to leave mobile data active all the time, but hopefully it will work! The setting in normal options, for intelligent wi-fi, seems like it would intelligently conserve battery by not leaving mobile data active all the time, but only when your Wi-Fi is spotty/poor. Unlike that, the developer option seems to ignore the Wi-Fi quality and just keep mobile active always.
KingFatty said:
I will try this today after work.
The Developer Options includes this setting: Mobile data always active
The developer option is not ideal because I don't want to leave mobile data active all the time, but hopefully it will work! The setting in normal options, for intelligent wi-fi, seems like it would intelligently conserve battery by not leaving mobile data active all the time, but only when your Wi-Fi is spotty/poor. Unlike that, the developer option seems to ignore the Wi-Fi quality and just keep mobile active always.
Click to expand...
Click to collapse
Otherwise you have to look into tasker and setup your own routine
tiliarou said:
Otherwise you have to look into tasker and setup your own routine
Click to expand...
Click to collapse
No setting or developer option works to allow the phone to have a network connection via cellular once you connect to Wi-Fi where the Wi-Fi is bad.
Can you elaborate on tasker? My understanding is there is no routine that could make the phone maintain network connectivity to cellular network once you connect to Wi-Fi, because the phone is incapable of performing this functionality that it's plainly supposed to be capable of.
There are two settings that are supposed to do this "dual" network connection: intelligent wi-fi or developer option keep mobile active always.
For my phone, *BOTH* settings are fake or not implemented. I wish someone else could confirm?
Just went out to the dashcam, connected my phone to the dashcam via Wi-Fi, and once connected to the dashcam, my phone was unable to reach the internet.
I verified all the following combinations fail:
* Intelligent Wi-Fi on, developer mobile data active off
* Intelligent Wi-Fi on, developer mobile data active on
* Intelligent Wi-Fi off, developer mobile data active off
* Intelligent Wi-Fi off, developer mobile data active on
My point is no combination of any setting can do what the phone is supposed to do. Therefore no tasker routine could somehow enable the phone to accomplish this.
Could anyone please try to verify this? I'm trying to figure out if it's just me, or if all phones suffer this bug failure to implement a feature mentioned at two different places in the phone (settings for advanced wi-fi intelligent Wi-Fi, or developer option for keep mobile data active all the time).
To verify, just unplug from the router the cable that goes from the modem to the router, so your router will still accept Wi-Fi connections from your phone, but your router will no longer have internet. At that point, see if there is any possible way for you to browse the internet via the cellular network.
My point is your phone will stupidly refuse to use the cellular network because it's connected to Wi-Fi, regardless of you telling the phone to use the cellular network via either of these settings (intelligent wi-fi or developer keep mobile data active).
Yeah I got your point. Maybe a bug in the firmware or with your phone, because I have experience with the S21 Ultra of bad wifi network connected and 4g coming up (then I don't see the wifi network icon in the bar up). And then the wifi settings was saying something like "will reconnect when connection is good". I don't know why it doesn't work for you.
Do you have the Wifi energy saving mode option on ? Mine is off. Auto switch to mobile data is on in wifi setting. Developer option for always on is off.
tiliarou said:
Yeah I got your point. Maybe a bug in the firmware or with your phone, because I have experience with the S21 Ultra of bad wifi network connected and 4g coming up (then I don't see the wifi network icon in the bar up). And then the wifi settings was saying something like "will reconnect when connection is good". I don't know why it doesn't work for you.
Do you have the Wifi energy saving mode option on ? Mine is off. Auto switch to mobile data is on in wifi setting. Developer option for always on is off.
Click to expand...
Click to collapse
I can see your point when it comes to the setting "Intelligent Wi-Fi - Switch to mobile data": It sounds like your phone is "disconnecting" itself from the bad Wi-Fi signal, so your phone is *NOT* connected to any wi-fi when it works via a cellular network connection (4g coming up). Is that correct?
But I don't think the developer option for "mobile data always active" works that way. Instead, I think it should do what it says, and keep the mobile data available regardless of whether you connect to Wi-Fi, and regardless of Wi-Fi quality.
I'm trying to *maintain* the connection to the Wi-Fi network that has no internet, so that I can use the internet via the cell phone network without disconnecting from the Wi-Fi signal. Currently, my bad Wi-Fi network is listed as one of the "Network exceptions" under the "Switch to mobile data" so my phone knows not to disconnect from that Wi-Fi network when it sees the absence of internet via that Wi-Fi signal.
But I don't think the setting for keep mobile data active will cause the phone to disconnect from a bad Wi-Fi signal.
Are you able to try turning off the intelligent Wi-Fi, and turning on the keep mobile data active, to see if your phone still behaves that way (disconnecting from the Wi-Fi)?
Have you managed to solve this? I have the same problem..
settings - connections - data usage - mobile data only apps
this should resolve what you need to do may need to use 2 different browsers if youre trying to log in to your dashcam
st3chn0 said:
settings - connections - data usage - mobile data only apps
this should resolve what you need to do may need to use 2 different browsers if youre trying to log in to your dashcam
Click to expand...
Click to collapse
Thought of that, however then I should enable it for all apps I am using during driving such as Spotify, Google Map, Waze, etc. and each time I have to reverse it. That is just too complicated and tedious and not a solution, neither a not viable workaround.
Hmm, looks like the settings, connections, Wi-Fi, ..., Advanced, "Switch to mobile data" no longer exists after the somewhat recent Android 13/One UI 5.1 OS update?
I'll have to try the new approach above for my dashcam, but the problem is my dashcam provider updated their dashcam app and it instantly crashes on my phone now running Android 13. So I will get around to this eventually, once my dashcam provider updates their dashcam app again so I can run it and test.
It remains to be seen, after eventually assigning the dashcam app to mobile data only, if that assignment will interfere with the dashcam app's ability to connect to the dashcam via Wi-Fi. The issue is that the dashcam app needs to connect to the physical dashcam via Wi-Fi which lacks internet, while also using the mobile data connection to get internet from the cell phone tower. So it's the same app that needs both forms of connection. The new settings seem to be either/or, but NOT both. I'll just have to test it eventually.

Categories

Resources