yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] nookin:
I guess I am in the minority here. I downloaded the Better Wifi on/off app off the Play store.

What I want is to turn off the Wi-Fi automatically when I turn off my screen. I do not want anything else. That is the only action I have in the app. I don't need the Wi-Fi to be turned back on automatically.

What I noticed is that the battery life is significantly worst when running the app. All without turning the WiFi on. The phone normally drop 10% in a day (not a typo, my phone last very long). But if I have the app enabled, it drops 20% in the end of the day. Does the app wakes up from time to time to check on things?

App ver is 2.0.0.0. Phone is LG Optimus-T running 2.2.2.
[Android Apps and Games] chamonix:
Bwof does not wake up your phone except if you said so. If you want to see what keeps your phone awake or wakes it up I recommend BetterBatteryStats. You can post a dumpling here together with a log from Bwof and I will have a detailed look at it
[Android Apps and Games] Smiff2:
thanks for this app, seems to be what i need. running Terra ROM v5 and it ignores my advanced wifi sleep setting, wifi stays on all time and phone doesn't enter deep sleep because of it, i think.

so anyway two problems i've noticed with this app:

1) breaks system status bar wifi icon. weirdly, wifi is on and working fine but no wifi icon. think i will have to remove app for now because this is too confusing for user. any ideas please? could be to do with custom rom theme (i am using stock Terra ui, not sure what he's modified, might try different mod).

2) ram usage seems high, noticed it climb to 20MB+ quickly, on X-U RAM is a problem anyway so this might not be good.

also when it says "connection active, leaving wifi on" how do we check what's causing it to be active please?

edit:

3) er it doesn't work for me

actually the log makes no sense to me.

with default app settings and wifi on, i turn off screen, and when i wake phone up wifi is still on and latest log reads:

(real order, so reversed from way log shows it)

1. screen was unlocked

2. turning wifi on (<- it was already on!)

3. scheduling wifi to be turned off in 30s (<- why, i've just woken phone up?)

time for all these is same so it's possible order is wrong, but behaviour is also wrong.

edit2: changed the detection method from unlocked to screen on.

similar problem.. app doesn't seem to be able to turn wifi off. weird. both the slider in system settings and the notification wifi toggle that came with the rom work fine.

log now looks like this:

1) screen off, wifi scheduled to turn off in x seconds

2) screen on

3) wifi already on, nothing to do

wifi *enabling* works fine with app (if i manually turn wifi off, turn screen off, wait, turn on > wifi comes on)

(edit3: running as foreground service may fix this. but then you have constant notification. hmm will try for longer..)*

* This was wrong i think, makes no difference.

edit4: it's working, i just have an icon problem!

anyone else see an icon problem? wifi icon sometimes doesn't appear at all, sometimes shows but as if no connection (in both cases working normally), sometimes shows signal strength normally. not sure if this is rom-related (Terra v5/ ics c.10/b.54).
[Android Apps and Games] Mr.AFK:
Only Kernel change doesn´t effect the behavior.

But i deleted the app data and set again ( may be some CID´s not tagged )

This morning, only Data network activ, W-lan was turned off or wasn´t turned on :)

@ chamonix

do i have to change the system w-lan settings(alway on, a.s.o) ? or should i leave it, like the rom brings within?
[Android Apps and Games] chamonix:
The rom settings do not matter: those define the wifi sleep policy that is known to be inconsistent among devices and roms. Their purpose is to try to control wifi when the phone is asleep. What bwof does is different as there is no attempt to optimize wife's battery consumption: bwof turns wifi off and by doing so makes sure that the battery consumption is 0 in that state
[Android Apps and Games] chamonix:
The icon problem is a bug in androids framework not refreshing the title bar properly when any third party changes the wifi state. It is rom dependent though and have not had that problem in 3 month on cm10.1
[Android Apps and Games] Smiff2:
thanks ok, the graphics are not so important, main thing is to have detection set to screen on (not unlock) for it to work on XperiaU and probably some other sony phones. if you can make it work by unlock even better but sure there's some technical reason why not.

i'd suggest making the two "ignore user overrides" options be on by default, unless they already are with beginner mode?

thanks great app an instant essential imho!
[Android Apps and Games] MichunB:
I still have a problem with my phone that thinks it is connected to whitelisted wifi but it is not

and I was thinking about checking current IP network as a workaround to this situation

to make whitelist of IP networks and condition to leave wifi on if connected to whitelisted IP net

chamonix what you thnk abou it?
[Android Apps and Games] chamonix:
Checking for a cage would indeed be a way to work around the problem as long as you have not set bwof to stay on as long as the access point is visible (as cage will only be tested when the connection is established).
[Android Apps and Games] rold50:
Battery drain on certain wifi spots

Hi,

Can this fix the issue where I get huge battery drain when connected to certain wifi hot spot?

I read somewhere that the issue is due to the router itself so I was just wandering if this can possibly fix this instead (since the battery drain happens only when I'm connected to the wifi in my office).
[Android Apps and Games] chamonix:
The reason I created bwof is based on the idea to get rid of wlan rx wakelocks. Now there are other causes of drain related to wifi being on, like Googles wifi sniffing of wlan hotspots that will be prevented also so if you know the cause of the drain you will know, or you just try it out. An analytic approach would be to post a bbs dumpfile here and I can tell you
[Android Apps and Games] Szczepanik:
Xda portal

Congratulations Better WiFi made the xda portal

http:\\www.xda-developers.com/android/better-wifi-onoff-gives-rule-based-wifi-control/

Well done and well deserved.

Cheers

Tom
[Android Apps and Games] p107r0:
any chance/point in adding wifi TX power tuning (to reduce radio power consumption when not needed)?
[Android Apps and Games] RovG:
Hi Chamonix,

I have noticed that whilst I am busy on my device wifi is still being switched off.
[Android Apps and Games] josuearisty:
Nice, let me try!
[Android Apps and Games] chamonix:
From the log it seems Wifi was turned off because no connection was detected. Was your phone connected? If yes could you attach a logcat
[Android Apps and Games] chamonix:
Well I'm not sure. In how far wouldn't android manage the TX power properly? I will look into the possibilities do do that from user and but I guess kernel is the right place to tweak that.

Do you have a specific use case in mind?
[Android Apps and Games] smokeythebear3:
Is there anyway to keep the wifi on when using apps like Pandora over wifi when unplugged? When the screen turns off, my music stops playing because it goes back to 3g
[Android Apps and Games] p107r0:
The goal would be to lower wifi power usage when you have strong signal.

It can be set manually with iwmulticall/iwconfig command in terminal, there's also an app for that in market. I can provide more details if needed later.

I tried both approaches on GB and it seemed as if the average current at lower setting was also lower - though I have no way to check if it's not a placebo effect...

Things look slightly different in ICS, it seems as if the power parameter was rescaled - the command returns completely different values.
[Android Apps and Games] chamonix:
If Pandora uses a wifi lock the next upcoming feature will cover that. I plan to add a pref to not turn off Wifi if a Wifilock is hold. An alarm will then check if a Wifilock is still active from time to time and avoid turning it off as long as that's the case.

The procedure for achieving that is a little tricky as there is no public API to check for Wifilocks but I found a private one and know how to call it. Let's just hope it is implemented properly.
[Android Apps and Games] chamonix:
Feature request add: https://github.com/asksven/BetterWifiOnOff/issues/13

We can keep the discussion going on here or on github.
[Android Apps and Games] MrElvey:
carrier-less phone support

Cool idea.

I'd like to have it work to support my use of my carrier-less android device (ZTE Score) as a phone, in conjunction with a MiFi 2200 and fixed WiFi when at home or work.

I use Google Voice for SMS send and receive and use various apps for voice - experimenting with/using Talkatone, GrooVe IP, KakaoTalk and have tried others.

So what does this mean, feature wise?

I wish I could prioritize my WiFi networks like I can on my Mac. It should use the MiFi IFF there's no other known network in range...

Of course, WiFi turns on if it's plugged in, or I try to make a call - looks like the app already does this.

It should turn on at boot time!

When the device is not in use or plugged in WiFi could cyclically turn on after an interval, and then turn off after a brief period, both user-specified. Better yet, it could determine these time periods based on battery charge, and anticipated time to next recharge.

e.g. : Stay on if battery over x%, I'd set this to 75%. Turn on for, maybe, x seconds, and off for y seconds, where x is "long enough" (see links below) and y goes up as battery charge drops

It depends on how quickly a WiFi can turn on and turn off; it seems to take a surprisingly long time, but perhaps part of the steps can be skipped. There are various extensions to the WiFi specs that improve battery life... http://enwp.org/IEEE_802.11e#Automatic_power_save_delivery , http://enwp.org/Wireless_Multimedia_Extensions but what support one finds for them among various android devices and versions I have no idea, though I'm curious! Likewise, how an app could determine x on the fly by figuring out what support the host and AP combination could provide. Yeah, it's quite a project.

I find "WiFi Fixer" somewhat helpful, as android devices seem to give up on connecting to WiFi APs too easily and disable them, but i also find it buggy-sometimes it turns off WiFi when the connection is fine, so I often don't use it.
[Android Apps and Games] chamonix:
I find the idea interesting. Placeholder feature request added: https://github.com/asksven/BetterWifiOnOff/issues/14
[Android Apps and Games] chamonix:
Just a treaser:

- Wifilock detection seems to work

- I have added Wifilock while plugged and permanent Wifilock

- Wifilocks come in two flavors: "normal" and "full power"

I have a few things to sort out but that will definitely be the scope of upcoming 0.4
[Android Apps and Games] Edwrib:
Nice!
[Android Apps and Games] yhrn:
Hi,

As mentioned earlier I need the "white list AP" before I can start using the app for real so I don't have that much useful to say yet. However, I have installed it to check it out a little bit and I think I may have found a bug. With both "Disable all" and "On when plugged in" checked Wifi is still enabled when plugging in a charger.

I also wonder a bit about the various preferences and how they interact. Some examples:

"Start on boot" - what happens if this is not checked (default)? Will Better Wifi not start managing Wifi until the app is opened manually?

"Run as foreground service" - how likely is it that the service will be unloaded otherwise? Is it dependent on Android version or kernel?

What does it mean if both "On when screen on" and "On when screen unlocked" are checked (default)? Couldn't these two settings be combined into a spinner?

If both "On when screen on" and "Off when unplugged" are checked and the screen is on when unplugging the phone, what's the expected behavior?

My feeling is that it would be very useful, especially if more choices make it into future versions, if it the app could make it clearer how the various options affect each other. For example, by somehow indicating what overrides what or by showing a summary of the behavior that the current settings will render.
[Android Apps and Games] tdunham:
Please thank the OP!

Seriously?

966 downloads and only 22 Thanks on the OP for this.

Some of you need to go back and hit that button. :D
[Android Apps and Games] hadron:
a nice app. screen off delayed wifi off is nice
[Android Apps and Games] DJCrapsody:
Subscribed. Will be testing this when I get my SGSII back from servicing. :good:
[Android Apps and Games] chamonix:
Here are some news about me progress.

I was indeed able to access the Wifilock counter (private member of WifiManager) using reflection. I did a lot of testing about detecting WifiLocks being present as I want BetterWifiOnOff to respect that and wait till they are released before turning Wifi off. Now there are some inconsistencies here.

My understanding: WifiLocks keep the radio awake, not the phone. So basically they are the same as "keep Wifi always on" that can be fount in the Wifi policies.

My observations: the presence of Wifilocks is not consistent on my test device (sgs3, cm9): depending on the Wifi state (scanning, connected) it seems that the Wifilocks I set are "lost" by WifiManager. This is not the design as a full Wifilock is supposed to keep the radio awake whatever state it is in. They seem to be there if I look at my power consumption increased last night) but not detected and can not be released either and that worries me.

In order not to draw the wrong conclusions I will write a test client doing nothing else that holding Wifilocks and displaying their status as well as displaying the status that WifiManager has about those.

I can them test with that tool on multiple devices without going through all the logic of BetterWifiOnOff.

Besides that the code for hold a WifiLock and a full power Wifilock is finished.
[Android Apps and Games] Impulses:
Interesting app... The ASUS Transformer has had an issue for a long time where Wifi isnt disconnected properly when the screen turns off, even when its set to do so under Wifi policies within the settings. Most people use an app called Auto Airplane mode to force Wifi off (via airplane mode) when the screen is off, it's worked well for me too but the icon it leaves in the notification bar is somewhat annoying (particularly because it seems to flash up randomly for no rewason).

Anyway, would your app override the flaky non-working default settings for Wifi on the TF? I think I'm gonna try it out regardless, the setting for turning off Wifi if you're not connected after X amount of time would be nice to have on my phone (right now I just have an app that instead gives me a notification if Wifi is on and not connected).

---------- Post added at 05:23 PM ---------- Previous post was at 04:59 PM ----------

Testing it on my tablet now, I had actually misunderstood some of the functionality tho, so I have an actual feature request (you can probably guess what it is from my previous post)... I'd like a new rule for turning Wifi off: Off when disconnected X amount of time... So I dont need to worry about manually turning it off when in walk away from a hotspot. I realize that setting would be semi useless or conflicting for all of you who are using the app to just turn off Wifi when the screen is off but still...

I cant just use the setting to leave it on only if connected because on my phone (unlike my tablet) I never really want to turn Wifi off automatically... If I have no wake lock issues of any sort with Wifi on my phone so I manually turn it on when im in range and I want it to stay on for as long as im in range, hence the request.

Finally, I agree with a previous poster that the duality of the "On when screen on" and "On when screen unlocked" settings seems confusing, you should only be using one or the other no? Wouldn't the former override the latter if both are enabled? I think someone asked earlier but I didn't see an answer...

P.S. I didn't recognize your Xda handle and didn't make the connection that you were also the author of Better Battery Stats until I saw asksven within the app, you should have it in your sig or something! Bought BBS over a year ago and I've recommended it a lot.

---------- Post added at 05:30 PM ---------- Previous post was at 05:23 PM ----------

Seems to be working OK on the tablet, will put it thru it's paces for a few days and see if it doesn't fail like the stock Wifi policy... I do like the option to only turn it on once unlocked, since I often dock and undock the tablet unto/from the keyboard dock for charging (which tends to wake it but I have no need for Wifi to come on if I am a not actually sitting down to use it).
[Android Apps and Games] STAticKY:
Hey i dont know if its been mentioned here.

Using the latest beta with donate (happens with the playstore version too) when i have options to stop and start wifi handling when user disables/enables wifi enabled, then i reboot, it automatically checks the option to disable all processing.... i expect it to just go back to the same settings i had before i rebooted but it always checks this option so untill i uncheck it the app does nothing......
[Android Apps and Games] Mr.AFK:
Did you check the options for start app at boot and / or start app as service?

Gesendet von meinem GT-I9100 mit Tapatalk 2
[Android Apps and Games] STAticKY:
Yes and no. It loads on boot but with the disable all processing option checked

EDIT: enabling as a service fixes the problem but now i have a pesistant iccon in my statusbar.... are there apps avalible that can hide that??
[Android Apps and Games] Mr.AFK:
Clear appdata and test again (for start app as boot)

no idea to hide app icon...
[Android Apps and Games] STAticKY:
You my friend are a legend :) works now without setting as service
[Android Apps and Games] Rageltus:
Hi everybody,

i have a question. Is it possible to have a function like Llama who looks where i am (with CDMA/GSM Location awareness) and then turn wifi on and off when i am not at home or something else? Actually it activates the process only when the screen goes on or the user is present... right?

Thanks
[Android Apps and Games] rold50:
Thanks. I'll post a BBS dumpfile later tonight.
[Android Apps and Games] p107r0:
I believe it does what you ask for at least since the version 2.0 - check settings and pots #1:

V.2.0RC3

#11: added cell tower awareness and rule to turn Wifi on only if connected of known cell
[Android Apps and Games] chamonix:
The sticky icon is a feature of android that can be overridden on 4.2 in the app settings
[Android Apps and Games] Rageltus:
Thank you but this is not what i want or mean or i totaly missunderstood. I think of the following feature:

Wifi on when i am at an specified location _without_ turning The screen on or locked in.

This is not working at The Moment. Today i must turn The phone on then The APP looks at The cells and turned wifi on.

Is it possible to turn wifi on at an tagged location without unlock The phone?

Thanks :)
[Android Apps and Games] rold50:
Hi Chamonix,

I have attached a screen shot of my battery usage and dumpfile of BBS.

Thanks.
[Android Apps and Games] MichunB:
(it is about problem with my phone that thinks it is connected to whitelisted wifi but it is not)

unfortunately it will not help because BWOF do not do check connection status on screen unlock when CID is unknown - in that case message is 'cell is unknown do nothing' and bwof does nothing

i have set 'if connected' and 'if connected check for cage' in 'leaving wifi on when screen on' section (if connected to white-listed ssid not checked)

chamonix could you enable BWOF to do connection status check on screen unlock even if cell is unknow please?
[Android Apps and Games] chamonix:
You max want to update to bbs 1.13.4 :)

Besides that I can confirm that most or your awake and Wakeups are related to wifi being on: wlan_rx_wake and the overhead caused by map's wifi sniffing. I bwof is definitely for you
[Android Apps and Games] rold50:
Thanks. I will update to bbs 1.13.4 :)

How do I use bwof to fix this? The issue is that this only happens when my phone is connected to my office's WIFI.

When I'm home, I'm not getting huge battery drain (wlan_rx_wake).
[Android Apps and Games] tisazalay:
I'm not an expert but white list your home wifi so you can set special parameters for it like leaving it running. Then let bwof do it's magic on the office wifi (ie. turn it off while unplugged and screen locked for example) a side effect is that then you'll use more data if enabled.
[Android Apps and Games] chamonix:
The default setting will help as it will turn wifi off when screen is off, avoiding Wakeups. If you want to avoid turning wifi on when at work you can use the Whitelist and only add you home ssid and/or use cell geolocation to control the way wifi gets turned on
[Android Apps and Games] The Lord Vader:
Sven, first of all thanks again for a outstanding app! I support your work on Playstore as with BBS.

Just a question, is it possible to implement a function to enable/disable data, just as with WiFi?

Keep your good work up!
[Android Apps and Games] MichunB:
I still have a problem with BWOF thinks my phone is connected to whitelisted wifi but it is not

I flashed my Samsung Galaxy S 3 to newest stock firmware I9300XXEMC2 and I did factory wipe

but it still do not work

I am away from my wifi, phone work s on GSM connection but in BWOF logs I see 'access point xxx is whitelisted: leaving wifi on

I got a hint from chamonix when I suggested to do IP network checks

but I do not see why it could help because

1 when BWOF is away from CID it does no further checks, it has to be in tagged CID range to do if connected check and then check if caged

2 when my phone is not on wifi or wifi is not connected like in case mentioned network traffic goes throught GSM connection so DNS check will be positive

I do not understand why BWOF thinks my phone is connected to whitelisted AP, because my phone knows it is not and switches to GSM connection, so maybe method BWOF uses to check connection status is not optimal

please help
[Android Apps and Games] boobiestar:
I was also looking for a function to lower drain my battery with mobile data. I use now BWOF and Toggle2G mod http://xdaforums.com/showthread.php?t=739530.

I saw in last version of JKay framework that there is an option to toggle data on/off with screen on/off.

I can say that my battery drain with Toggle2G mod is very low with phone in use. When on wifi, I am now on 2G what is much more battery friendly.

But I prefer one mod for wifi, data and 2G/3G because with separate apps it doesn't function optimal.

Sven do you think this is a wanted feature you can implement?

Sent from my GT-I9300 with Tapatalk

Sotmax Ultimate V19 - Yank555.lu-V3.3i - JKay 14.94
[Android Apps and Games] chamonix:
I will have to look into the api for that. Could you elaborate on the way it would be handled? Just on/off?
[Android Apps and Games] corrsea:
I use an app called smart data switch in conjunction with BWON. It has an option to set data to switch off when screen off. You can set it to switch on for a few minutes at regular intervals while screen is off to pick up notifications etc.

In addition it has a wifi preferred option so if wifi is switched on by BWON data will automatically switch off.

Mostly the 2 apps work well together, but of course it would be great to have all that functionality in the one application.

The icing on the cake would to also have an auto toggle to 2g when screen off:)

BTW this is a wish list not a request :)

ROM Sotmax Ultimate V19

Kernel Yank555.lu-V3.3i
[Android Apps and Games] Mr.AFK:
@ Sven :

May be you can take a look into my log.

The cell is tagged, but wifi don't turn on.

I saved the log, uploaded to Dropbox.

http://db.tt/QtoZMSEa

Display went off.

After turn on, the wifi turns normal on. Strange.

Gesendet von meinem GT-I9505 mit Tapatalk 2