yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] d0wns3t:
How much power does WiFi actually use if you aren't connecting to a network?
[Android Apps and Games] rainabba:
Plenty since it is still trying to locate with APs, enumerate them, and etc, etc but the point is that if you aren't using Wifi and it consumes ANY power, then it's just wasted power. This apps seeks to eliminate that waste as much as possible.
[Android Apps and Games] sebouh00:
The CPU usage is highly dependent on how much network updates your phone is receiving. Right now, the app on my GN is showing between zero and one, while I'm connected to a hotspot. The app basically does nothing but wait for signal or cell updates when the screen is on (connected to a wifi or not).

When the screen is off and the phone's not connected to a WiFi network, it does nothing, unless you specify scheduled checks. When it is connected to a network, it keeps checking if WiFi is still connected, but only when the phone is awaken by some other process. So no processor locks are held.

There is still possibility for improving resource utilization though, and that's part of the plan in future releases.
[Android Apps and Games] sebouh00:
Hi. Unknown means it doesn't have cells associated with the hotspot. When you're connect to the hotspot, it will start collecting cell info.

Check the Advanced activity from the options menu. When you're connected to the hotspot and the service is running, you'll see which cells have become associated with this hotspot and at what range of signals. You'll see why it's toggling WiFi.

Let me know what you find out.
[Android Apps and Games] sebouh00:
It's now just about WiFi's battery drain. When you're on data instead of an available hotspot, you're draining battery as well. The app automaticaly handles the switch to WiFi.

Also, for everyone asking about disabling data, Android does this on its own. When you're connected to a WiFi hotspot, data will not get used. Disabling it will not have any effect on battery life.
[Android Apps and Games] purportex:
Logic Improvement

It will be nice to enable another one logic fature. Let me explain the situation:

During all day I'm at work and during all night I'm at home. I do not want to use the connectivity during all this time, cause I use mail client, etc. on a desktop and really do not need connectivity during sleeping. It's a useless battery draining...

Possible solution:

Make available checkbox to respect data switcher (via mobile network) that indicates I'm really need the connectivity right now and just in this case time to time dicover the wifi.

What do you think?
[Android Apps and Games] sebouh00:
What you're basically looking for is to disable connectivity for a certain duration throughout the day.

You can do that by creating triggers. From the Preferences, go to Triggers. Click Add. Set the schedule you want and choose an action. You may lock/unlock wifi or enable/disable data.

For example, if you don't want wifi and data at night, set two triggers to lock wifi and disable data at say 12 AM, and set two others to unlock wifi and enable data at 7 AM.
[Android Apps and Games] rl421403:
Hi sebouh00,

Thanks for great work with this tool. I really like the concept and for a brief time I thought this is a perfect solution for me for what I want.

So I installed it with default settings on my S3 and enabled this app. Then I tracked wifi activity on my device for some time and I noticed strange behavior.

I am using CM10 rom and I have enabled this option to disable wifi connection, if my phone screen is turn off for 5+ mins.

When I turn on my S3 after 10-20 mins sleep, wifi was disabled (as expected) but wifi do not turn on automatically (as it should) and I had to do it manually. Also, when I start using browser after turning on wifi, wifi start toggling on/off. If I remove this app, I could use internet again.

I would like to use this app because it fills a gap where my phone's wifi is still enabled if I am not at home or office.

But with this tool, I also don't want wifi to be enabled for whole time I am at my places.
[Android Apps and Games] paincorp:
So I love what this app is supposed to do, but it doesn't seem to be working on my GN. I hit the wifi button to toggle wifi on in the app and it only stays on for 2 seconds, needless to say it can never find a hotspot. When I turn it on manual outside of the app, it's not recording any cell towers. Any idea what's going on?
[Android Apps and Games] sebouh00:
A few things to note here:

The app will not turn WiFi on if it doesn't recognize the cell, or if the signal strength is way out of range. You can check this by connecting to the hotspot and opening the Advanced activity from the options menu. See what cells are associated with the hotspot and at what range of signals. Next time it fails to auto-connect, see what those values show.

The app shouldn't disable WiFi if it is connected to a network, unless you have a tirgger set up. If this is in fact happening, send me the log file and mention the time of occurance. Let me have a look.

If you prefer not to have it auto-connect to a hotspot, from the Networks activity, toggle it's "auto-connect" setting.
[Android Apps and Games] sebouh00:
2 secs is not enough, obviously. Are you certain the disconnection timeout is set correctly?

When you connect to a hotspot while the service is running, check the Advanced activity from the options menu. Does it list any cells?
[Android Apps and Games] paincorp:
The disconnection after being connected to wifi is 30 seconds, other than that I don't see any disconnect settings.

I see the cell sites listed while connected, but after I disconnect it says unknown in my list of known APs by each one.
[Android Apps and Games] sebouh00:
Strange stuff there. Send me the log file generated by the app (/sdcard/SmartWiFiToggler/). Let me have a look at what's going on.

Also, what is your device/OSv?
[Android Apps and Games] paincorp:
Galaxy Nexus, 4.2.1

---------- Post added at 06:22 PM ---------- Previous post was at 06:12 PM ----------

just pm'd it to you.
[Android Apps and Games] rl421403:
It's still not working. Same issue.

I just PM you log files. Please check.
[Android Apps and Games] ilarrain:
Great app! I was accomplishing similar functionality using on{x} and a custom script, but that requiered complicated configuration for each area and drained more battery monitoring other sensors and using the GPS once in a while. This app does the same, but better and with a very simple config.

I'm algo getting high CPU usage by this app (3-7%).

+1

It would be great to see some colaboration on GitHub.
[Android Apps and Games] sweens:
Enable wifi for location services

Great app!

Is it possible for the app to detect when location based apps are being used and temporarily enable wifi for a-gps? This would be great for nav, places searches, foursquare, etc....

Thanks for the awesome work you've put into this
[Android Apps and Games] rasa92re:
Wow, that is a great idea. That would be great with saving battery life.

Either way, fantastic app. I haven't ran into any issues. I am on ATOM 1.38.

Sent from my Galaxy Nexus
[Android Apps and Games] tmello56:
So it stays connected to the networks now. However, I still can't set it to auto-connect. When I look in the advanced setting each network I've connected to has been associated with 5+ cells at some point. The app seems to auto disconnect but doesn't seem to auto-connect. Not sure how to proceed.
[Android Apps and Games] d0wns3t:
Yep don't disagree with that, was curious if anyone was able to quantify it? With some ppl getting towards 10% CPU just wondering if they are benefitting? From checking my battery usage android system is the highest user it might be grouped under but mine is at 4% after WiFi has been on all day but not connecting to networks. Android OS is 3%, does it fall under either of those?
[Android Apps and Games] sebouh00:
This is an issue with JB 4.2. I'm working on a fix and will release it by tomorrow hopefully.
[Android Apps and Games] sebouh00:
As you mentioned, not everyone's getting high CPU usage, because it's dependent on how much network activity there is (cell updates, signal changes, etc). The app gets triggered by those changes. There's still room for improvement, and my aim is to do exactly that.

In addition to just wasted power from leaving WiFi on, think about forgetting to switch back to WiFi. You'd be wasting power and consuming from your data limit. So the app tries to solve 2 common problems.
[Android Apps and Games] sebouh00:
If you think about it, if you're using an app that makes use of this information, you're probably either connected to a hotspot, or you're somewhere there is no WiFi coverage. So the only scenario in your case would be if you have WiFi coverage, but have chosen not to connect to it. You want to switch to it temporarily just to get that a-gps advantage, then go back to data?

Anyway, I don't think it's possible to detect that. :)
[Android Apps and Games] innerspace:
great idea!

love the ideas behind this app, going to give it a whirl.

would love to see something like this for openvpn to auto-load vpn profiles for specific access points.

nice stuff, thanks.
[Android Apps and Games] sebouh00:
Thanks, I received the logs. Here's what I found out:

When you start the service when WiFi is alredy connected, it runs with no issues.

When you put the device to sleep, after 20 mins (sleep policy setting) WiFi gets disconnected. Android disables WiFi but the status it reports it ENABLED. This is fine, as it will just cause SWT to set an alarm to disable WiFi after the 30 secs you've specified.

The problem comes afterwards. You turn the device on. This triggers a cell/signal update and SWT detects a hotspot nearby. It enables WiFi and after a few seconds you get a connection.

20 mins after the initial disconnection, the one where Android disabled WiFi during sleep, another disconnection happens. This again disables WiFi. It continues on with disabling WiFi ever few minutes.

My guess is that CM10's implementation of this sleep policy is buggy. It somehow resets a trigger to disable WiFi again after 20 mins, despite it being disabled during sleep. To know for sure, you will have to set the sleep policy to keep WiFi on, and check if you keep seeing the same problem.

Let me know how it works with the "always on" policy.
[Android Apps and Games] toddbecker:
According to Google, turning on wifi helps with location accuracy, even it if does not connect to a network. There is a XDA thread discussing this.

So, based on this information, there might be a valid reason to temporarily enable wifi based on the location request.
[Android Apps and Games] sebouh00:
Interesting. Thanks for sharing.

I'll keep this in mind for when I figure out a way to detect this sort of stuff.
[Android Apps and Games] DrGuns4Hands:
Same issue

I'm having an identical problem, also on Nexus 4 running android 4.2.1 Jelly Bean. The issue was the same on 4.2.0
[Android Apps and Games] toddbecker:
The issue I am having is that the app keeps locking wifi before I get home. I increased the time to make a connection and the delay between retry attempts. The problem I have is that I could be near my home (cell towers) for a while without actually being in range of my home wifi network.

I have increased the cell strength influence, waiting to see if that helps.
[Android Apps and Games] sebouh00:
Hi. Don't increase the interval between attempts. There's no need. Increasing the Trial timeout is one option. Look into increasing the "Attempt Warning" setting. The default is 3, but a higher value may be better in your case. When this warning it triggered, it auto-locks (if you have auto-lock enabled).

Edit: increasing the signal strength is helpful as well. It will have a tighter signal range to work with.
[Android Apps and Games] sebouh00:
v2.2.4 has been released. It should fix this issue.
[Android Apps and Games] m00g:
Awesome App.

Hi sebouh00.

Since the latest update, SWT is working perfectly!

I thought it was an issue with my setup previously (I'd always have to toggle wifi manually), but not anymore!

Fantastic app.

Its also great that you offer personal support.

Thank you.
[Android Apps and Games] lsdream:
Tasker and automateit can do the same action
[Android Apps and Games] Cloaker:
Get out.
[Android Apps and Games] lexluthor:
I was one of the early adopters and have been using this for a while now. This has been working great for me.

Works better than Y5 in a couple of ways. Y5 was more of a PITA to temporarily turn off wifi and also to connect to new hotspots. Smart WiFi Toggler also has many fewer cell towers saved so it turns on wifi only closer to my hotspots
[Android Apps and Games] sebouh00:
Hi lexluthor. I'm glad you've stuck around and that you're finding the app useful. :)
[Android Apps and Games] ickk:
hey dev, been using your app the better part of the week and I have to say I'm loving it.

It's totally unobtrusive to my device usage, and I can tell it's working. It doesn't always reconnect to my home network, but that's not what I care about because I can easily toggle wifi back on from my notification panel. What it is doing right is cutting wifi off at the intended time and saving my battery in the process. Now I can leave my device in high performance mode and not have to sustain heavy battery loses throughout the day from leaving wifi on.

Thanks again, great app man!
[Android Apps and Games] sebouh00:
Thanks man. I really appreciate the support. :)

When it doesn't turn WiFi on automatically, try to check what the reason is. Go to the Advanced activity from the menu and check if it recognizes the cell, and if the signal strength is within the range for this cell.
[Android Apps and Games] tmello56:
Thanks man, great update and quick responses. Much appreciated. Auto-connect issue fixed with the update. Thanks.
[Android Apps and Games] karaganchev:
This is really smart app, thanks!
[Android Apps and Games] bazyl:
Is there a way to have "persistent mode" enabled and hide notification icon ?
[Android Apps and Games] rasa92re:
I am on JB and just unchecked the notification allowance in "app info".

Dev, you have a great app here. It took a few days for the app to learn but once it has, smooth sailing all the way.

Sent from my Galaxy Nexus
[Android Apps and Games] bazyl:
I'm on ICS and can't find that feature :/
[Android Apps and Games] kenkiller:
It's working fine on my GNex, networks show my wifi hotspot having 2 cells.

But on my Nexus 7 3G, it's constantly showing an unknown. Anyway to troubleshoot this?

Under advanced it's basically showing null or 0 on every field, but I can verify the 3G is switched on and working. Not sure how N7 3G reports cells any different from the GNex.

But I can also verify Wi-Fi Matic (similar function to your app) lists cell towers fine.
[Android Apps and Games] lexluthor:
it's only jb and above. great feature.
[Android Apps and Games] richuk:
Under some of my wifi networks, I see Unknown rather than Auto-Connect enabled (x cells) and I cannot see any auto connect for them.

This means that the app doesnt turn the wifi on for this network.

Has anyone else had this issue?
[Android Apps and Games] richuk:
Just noticed that in the advanced log, it says the following quite a few times.

Bad cell data. Aborting save

Also it has Unknown cell in the box above with the operator number, LAC and CID values.
[Android Apps and Games] sebouh00:
Under WiFi Networks, if it's listed as unknown, then no cells are yet associated with that hotspot. That means the app has no knowledge of when to toggle WiFi for that particular hotspot.

As for bad cell data, that means it was not possible for the app to fetch cell data. There seems to be an issue particularly with the nexus 7 3g. I'll have a look at that soon.
[Android Apps and Games] mr.gonzoo:
I don't know why but in my Galaxy Nexus (GSM) app is constantly loosing connection, switching screen on, reconnecting and then the screen going back off. Being honest, it's quite annoying and I really don't know whether it is because of my fault (bad configuration) or something wrong with app here.

I'm on rooted stock 4.2.1 and I've been running app for about 5 days. It recognises greatly my networks, showing between 6 to 1 cells, In log it shows 'connected' & 'disconnected' nearly every 2-3 minutes on every connected network. I know that's not my GNex issue - previously, before installing SWT, I had none of that problem. Also, it doesn't depend on the signal strenght - I've checked it several times with different range between me and my router.

The main idea of SWT is so great! Thank you for your work. I've been looking quite a long time for app like yours!
[Android Apps and Games] sebouh00:
I have the same phone running a rooted stock 4.2.1, yet I don't have any problems. :)

Can you please send me one of the log files which shows this behavior? Let me have a look at what's going on.
[Android Apps and Games] jrub:
I've been using Smart Wifi Toggler for a week now.

The main issue I've found is that my wifi access point it's visible from the street, so I arrive home driving my car, it detects the cells and tries to connect, but then I enter the underground parking and the elevator to get into my home... and when I'm in, wifi has been locked off because it tried to reconnect so many times without success.

I guess I just can extend the Trial Timeout time, so it would keep trying to connect longer, but what I would like to see is a "Delayed connection" parameter, where I can specify a "wait time" since it first sees the cells, to start trying connection. In other words, I wanna instruct it "when you see my cells, wait 2 min to start connecting, which is the time it gets me to park and go up the elevator".
[Android Apps and Games] sebouh00:
You can increase the failed attempt warning notification which will delay the lock, in addition to the trial timeout. The disadvantage of course is that it will keep WiFi on for 5 mins longer (if that's how long it takes for you to park).

I understand your point though. I may implement a delay that increments with each trial. First attempt is direct, second is delayed by X secs, 3rd by Y... I'll experiment and see what's best. :)
[Android Apps and Games] richuk:
Thanks, I'm using a Samsung S3 LTE.

It has now picked up a cell for that AP, it just took some time.

Great app :)
[Android Apps and Games] divadkha:
I'm having connection issues , possibly when I'm coming back from sleep.

For example, I will be watching a Youtube video with no problems. I'll go away from my phone for a few minutes, then come back to Youtube and it will stop buffering. Changing to another video will play for a few seconds before trying to buffer and will stay there not loading anything. Turning off SWT plays all videos normally with no hiccuping and buffers quickly.

Another example, which is how I figured out it was SWT, was with Google Play Music. I just uploaded some new songs from my computer. So on my phone I would have it set to download and store it on the phone. It would have issues and keeps telling me "Can't download music" and to try again later. Once I turned off SWT, songs downloaded normally. And just to test, I would turn SWT back on, and it looks like it still downloads while the screen is on. Once I put it to sleep and back on, "Can't download music" again, until I turn off SWT.

Just to note, usually my phone connects to my wifi instantly within a few seconds. I've left the screen on for a minute with SWT on, but my connection issue persists, until I toggle wifi off and on. For now I'm leaving SWT off.

Any feedback on that, or would it be a bug I'm having?

On my Note 2 i317. Well, I'll probably try again when the next update or two rolls out.

BTW, great app! It actually does pick up when I'm near my wifi at home or at work. Thanks!
[Android Apps and Games] lexluthor:
Getting a lot of good pub this week

http://www.droid-life.com/2012/12/0...minded-conserve-both-battery-and-mobile-data/

Congrats!
[Android Apps and Games] sebouh00:
You have the WiFi sleep policy to turn WiFi off, right? That's the scenario you're explaining?

So the problem you are facing is that when you wake the phone up, SWT enables WiFi again but takes time for it to connect? The thing is SWT will only toggle WiFi on and off. It does not meddle with the connection. It leaves this up for Android to scan and connect.

I would appreciate it if you can repeat this scenario and send me the log file. I'll have a look at what is happening.
[Android Apps and Games] sebouh00:
Thanks. I'm actually perplexed by the feedback I'm getting. :)
[Android Apps and Games] toddbecker:
I increased the 'attempt warning' setting to 10 times, have the 'trial timeout' set to 90 seconds and increased the 'signal strength influence' to strong.

SWT no longer locks before I get home, so far so good.

Thanks!

I do have a request. I noticed that when SWT does lock, the notification icon changes. I would like to see the notification icon change colors as it is working. For example, red when locked, yellow/orange when trying to connect and green when connected.
[Android Apps and Games] sebouh00:
Good that it's working better now.

I'm actually avoiding colors on ICS+ devices following Google's design guidelines. I'll try to make that optional. :)
[Android Apps and Games] paincorp:
I'm still having the same issue on the Nexus 4 that I had on the Nexus 4. When I toggle WiFi on from within the app to look for an AP, it shuts off before really looking, usually within 1-2 seconds.
[Android Apps and Games] sebouh00:
paincorp, do you mind pm-ing me your email? I would like to send you a test app to try and see what's going on. Thanks.
[Android Apps and Games] MicroClue:
Hi,

I'm really not sure what the issue might be, but since installing (3 days ago), the app hasn't been able to track a cell network (from any wifi network I connect to)

The Operator, LAC, and CID are all known and found, but in the advanced panel, it states "Unknown cell". (However, the cell reception is really low continuously)

The log includes:

22:18:20: Connected to WIFI: [SSID:xxx], [BSSID:xxx]
22:18:20: Connected to Node B: [LAC:40486], [CID:29313]
22:18:20: This is a new WIFI AP. Saving it in DB.
22:18:20: WIFI AP has id: 1
22:18:20: Checking if this cell is already associated with AP
22:18:20: New cell inserted at 1
22:18:20: Starting Period checks
22:18:20: WiFi is already enabled
22:18:20: Stopping periodic check
22:18:20: Location update: 40486; 29313
22:18:20: Learning cells
22:18:21: WIFI connected. Saving cells.
22:18:21: Saving connected cell.
22:18:21: Connected to WIFI: [SSID:xxx], [BSSID:xxx]
22:18:21: Connected to Node B: [LAC:40486], [CID:29313]
22:18:21: This is a new WIFI AP. Saving it in DB.
22:18:21: WIFI AP has id: -1
22:18:21: Access point could not be saved or found in DB.
22:18:21: Signal strength 1
22:18:21: Ignoring 1
22:18:21: Adjusting cell min/max for ap xxx
22:18:21: Action Received: android.net.conn.CONNECTIVITY_CHANGE
22:18:21: WIFI connectivity changed.
22:18:21: WIFI is connected
22:18:21: Setting regular alarm
22:18:21: Stopping WIFI enabled alarm
22:18:21: Alarm wasn't started
22:18:21: Saving connected cell.
22:18:21: Connected to WIFI: [SSID:xxx], [BSSID:xxx]
22:18:21: Connected to Node B: [LAC:40486], [CID:29313]
22:18:21: This is a new WIFI AP. Saving it in DB.
22:18:21: WIFI AP has id: -1
22:18:21: Access point could not be saved or found in DB.
22:18:21: Action Received: android.net.wifi.WIFI_STATE_CHANGED

... and it continues.

I've used openstreetmap to see if the cell network can be found, and it found 6 different cell networks in different areas that it connected to.

I also (temporarily) purchased Smart Wifi (S4BB Limited) which seems to find the cell towers fine and saves it.

Thank you for any help.
[Android Apps and Games] sebouh00:
Are you getting "Unknown" under the hotspots in question?