yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] chamonix:
That would be a bug. Turning on the phone within the 30s is supposed to cancel the "off" alarm. I will try to reproduce and add a bugreport

Edit: I can't reproduce. Could you please post a logcat. Off/on causes the connection to be confirmed 30s after on but nothing happens 30s after off (if turned on straight away) so here it seems to work as designed
[Android Apps and Games] chamonix:
Before publishing b2 I'd like to hear your feedback on the two main features of b1:

- tasker integration

- widget

B2 is on its way but I'd like to make sure that I can fix anything broken about these features.
[Android Apps and Games] patsmike:
Widget is working very well!
[Android Apps and Games] pwvandeursen:
Locale integration seams to work perfect. Need to test the rest of the app still. But no issues as of now o. The localepart
[Android Apps and Games] hugo06:
Hi,

I have a request to add an option : when I receive a call, I prefer the wifi connexion is automatically disabled.

It is possible and insterresting ?

Thanks for your response
[Android Apps and Games] chamonix:
Release 1.1B2

New version is up. The changelog is in post #1
[Android Apps and Games] chamonix:
What would be the benefit of this? In my point of view it would be unnatural to turn Wifi off when screen goes off and that is the reason why exactly this situation is detected and handled in a way that is natural for the user.

I am willing to be convinced that another behavior with a corresponding preference makes sense.
[Android Apps and Games] oldsap:
looking at the log, after 30 seconds of no activity, the wifi is turned off. but it does not turn on my wifi again until my screen is turned on. is this by default? i wish to have it reconnect after a specified time even if my screen is turned off. is this possible? thank you.
[Android Apps and Games] chamonix:
Yes that is the main concept of bbwof, turn off wifi when screen goes off and wifi is not required.

Turning wifi on again when screen is off based on time would IMHO not help at all as apps will usually not get this information to adapt their bandwidth appetite. Could you elaborate more on the specific use case you mentioned so that we can discuss benefits/drawbacks. I am always open to adding features but wnt to be sure that they have a benefit
[Android Apps and Games] Pkt_Lnt:
My opinion is that a scheduling app like AutomateIT or Tasker would be a better choice to turn wifi on intermittently, rather than BWOF.
[Android Apps and Games] chamonix:
Has anyone tested the new feature that respects user's decision of turning off Wifi by disabling BWOF? I'd be glad to hear your feedback and suggestions for improvement
[Android Apps and Games] Dr.69:
Tested it now. Works fine on my SGS. Thanks
[Android Apps and Games] patsmike:
Works well on sgs2 running cm9. This is a sweet feature, complements the widget well
[Android Apps and Games] Dr.69:
Hi, I'm running the latest b2, and I want to report something which I believe is a bug:

When I am connected to wifi and the screen time outs for a second or two (like when reading something without touching the screen), when I wake the phone up the app still counts down and turns off the wifi.
[Android Apps and Games] chamonix:
Unfortunately that logcat is missing part of that sequence. COund you please reproduce and use the in-app logcat creation to create the log?
[Android Apps and Games] Dr.69:
I hope I did it the right way:
[Android Apps and Games] chamonix:
Much better, analysing the log now
[Android Apps and Games] chamonix:
I found something weird in your preferences: neigher wifi_on_when_screen_on nor wifi_on_when_screen_unlock are set to true in the prefs. What value is checked in your advanced prefs?

Edit: in any case this is a bug as even non existing prefs should cause that

Edit2: #78 already fixed for B3
[Android Apps and Games] Dr.69:
This it true, I don't want to turn on the wifi when the screen goes on. But, when the counter does start counting the 30s (and I'm connected to wifi), I think it should stop if I turn on the screen again before it reaches this limit.
[Android Apps and Games] chamonix:
1.1B3

New version is up with some fixes. See changelog in post #1 for details
[Android Apps and Games] chamonix:
Correct, that's the whole idea. B3 should fix that for all combinations of prefs
[Android Apps and Games] Dr.69:
Unfortunately, I'm still having this with b3. Also I had some strange issues with the configurations, as it didn't get the b2 settings after updating. For example, the delay was 60 seconds although I set it to be 30 seconds before updating and the app turned on the wifi with screen on, although it was unticked.

This is the log. I hope it has all the information.
[Android Apps and Games] chamonix:
I am sorry but the log does not confirm what you are saying:

2012-11-18 16:36:17 wifi_off_delay = 30 (String)

The reason for the problem you have is due to this:

2012-11-18 23:11:41 wifi_on_when_screen_unlock = false (Boolean)
2012-11-18 23:11:41 wifi_on_when_screen_on = false (Boolean)

Make sure to have one of "On when screen on" or "On when screen unlocked" ticked, both being unticked means that there will be no handling whatsoever when the screen os turned on / unlocked, means also no canceling of the alarms for turing screen off.

I just wonder how you could set both to "false" as one is supposed to be always "true".
[Android Apps and Games] Dr.69:
I guess I took the log after changing the settings back to 30.

I'm using the app only for turning the wifi off when I forget it. Is it possible for the app to work this way?
[Android Apps and Games] oldsap:
during a call, BWOF doesn't turn off the wifi even if my screen turns off because of the proximity sensor.
[Android Apps and Games] chamonix:
Yes, that's not a bug, it's a feature: as designed.
[Android Apps and Games] chamonix:
Before we start disussing other features: is the behavior fixed if you select one of "screen on" or "unlock"?
[Android Apps and Games] oldsap:
would it be ok to ask if it's possible to add an option to turn on the wifi while the screen is off for a specified time then turn it off again automatically?
[Android Apps and Games] Dr.69:
Sorry:)

Tested it with each of the options. Works fine. Thanks.
[Android Apps and Games] chamonix:
OK, let's talk about your feature request now that we have things sorted.

Do I understand this correctly: you want not to turn wifi on with bwof but have it turn off wifi when screen goes off. Is this correct?

May I ask about the rationale behind that? Bwof leaves wifi on only when a connection could be made to an access point. That means wifi will be on when a data connection is possible (and by doing so using a less expensive connection). For what reason do you not want this?
[Android Apps and Games] Dr.69:
I live in a two floor apartment, which is kinda big, because we are a lot of people living here. Bwof was connecting, as it should, to the whitelisted APs, but the signal was very weak in part of the rooms so I had to constantly turn off the wifi to use 3G (I have unlimited 3G, most of the time I use wifi for speed). Also I'm kinda paranoid about all kinds of wifi phishing, so I don't wan't wifi to be turned on without me knowing.

Bottom line, the rationale is to use wifi only when needed not bothering to turn it off each time, but maybe the option that may be added is to connect to an AP according to signal (bdm or something, but I'm not a dev and maybe it's a lot of work).
[Android Apps and Games] inFECT:
talking about...

i've set the wifi checking delay to 1 minute and after turning on the screen the app connect immediately. The only reason for this behavior is that i missunderstood the function and it's just a delay for the app checking the current network status. In this case i would like to ask if it's possible to add a timer for "not activating wifi withing a specific time". The reason behind this: Scenario: I'am on the way in the car or somewhere else without wifi connection and got an email. I just check quickly the mail and turn of the screen. That happens about 20-50 times a day and most of the time i have no wifi around me. Thats why i think its a waste of power to activate wifi all the time just because i unlock and quickly check the mails. (which usualy needs less than 30 seconds). Or maybe iam just stupid and didnt configured the app goodl enough and this request was a waste of time ;)

Anyways, great app!
[Android Apps and Games] chamonix:
RC1

Release is now feature comlete. First RC is up. See post #1 for changeog
[Android Apps and Games] RovG:
Hi Chamonix,

Thank you for the update. Please will you give the following some consideration.

Use case:

At work I use wifi but if I want to use Skype then I disable wifi & use 3G because the Skype doesn't work well with work wifi. Sometimes colleagues interupt me and my screen switches off. I then unlock my phone after screen on and make my Skype call. When I am done with my Skype call I re-enable wifi and I would like BWOO to manage my wifi connection again.

I have "Disable when user turns Wifi off" ticked. When I disable Wifi BWOO, BWOO ticks "Disable" itself and therefore disables itself. When I enable Wifi again BWOO remains disabled.

What would be better is:

If I manually disable wifi then BWOO disables itself and if I manually enable wifi then BWOO re-enables itself.

What are your thoughts on this, Sir?
[Android Apps and Games] chamonix:
#82 to have a symmetry to "disable when wifi is turned off"
[Android Apps and Games] chamonix:
Release 1.1RC2

New release is out, no changes but the merging the code to master.
[Android Apps and Games] chamonix:
It seems that RC2 does what it is supposed to. If nothing is reported till tomorrow that release is going to google play. Thanks for your testing!
[Android Apps and Games] chamonix:
Release 1.1

Release 1.1 is up on google play.
[Android Apps and Games] Miche1asso:
Hi Chamonix,

Thanks for yet another great application from you! I have been testing it a little and it seemed to work fine. Then after a while it wasn't turning the WiFi on anymore. Actually the WiFI was set as down in the Status Panel (Lidroid). I had it configured to be turned on when the screen goes on. The log wasn't showing the message "turning WiFi on" anymore either. You can check it in the dumplog I attach.

Now I erased the app data and it seems fine again. I will report if it will break up again. Still I'd like to understand one thing. As far as I understood there are 3 states:

1. WiFi on in settings, interface (eth0) on

2. WiFi on in settings, interface off

3. WiFi off in settings with obviously interface off

Shouldn't the app switch between 1. and 2. instead of 1. and 3.? I think that is what other applications like Green Power do.

PS: I just turned on the screen and the log in the app says:

- Screen was turned on

- Turning WiFi on

- Scheduling WiFI to be turned of in 30 seconds (??)

Still the WiFi stayed on. Few times yesterday I could notice the WIFi icon going up for few seconds after turning the screen on, then going down and then up again in a sec or so
[Android Apps and Games] chamonix:
That is at it should be:

- when screen is turned on or unlocked Wifi goes on

- an alarm is scheduled to check if there is an active connection after 30s. If not Wifi will be turned off again (of you have set the pref accordingly)

The log shows a sequence when the screen has been turned off and where BWOF turns Wifi off after 30s as there is no traffic but no action where the screen was turned on/unlocked.

About the 3 states you mentioned: Android has many states managed by WifiManager:

- the Wifi state (enabled, disabled, trasactioning)

- the Wifi mode (full or scan-only)

- the supplicant state (connected, disconnected, transactioning)

BWOF does not take care of the mode but normally just manages the wifi state and checks for the supplicant state to detect whether a connection was made or not. One exception to this is the advanced pref to connect to the strongest access point where the supplicant is set to the strongest one if multiple are available.

Edit: removed code as irrelevant
[Android Apps and Games] babylonbwoy:
App crashes when tapping setting button on my Xperia S (4.0.4 all stock) with last RC2 (with previous too).

I only can see first screen when launching the app but can't use setting, context menu works

Log : http://goo.gl/0qUkI
[Android Apps and Games] chamonix:
Got it, will fix later today: https://github.com/asksven/BetterWifiOnOff/issues/83
[Android Apps and Games] babylonbwoy:
OK, thanks. Just found that Juice Defender which is supposed to save my battery wake up my device something like 200 times in a battery cycle of 24 h!

Lt26i Tap-A-Talked
[Android Apps and Games] chamonix:
BetterBatteryStats would have told you that ;)
[Android Apps and Games] chamonix:
I just uploaded hotfix 1.1.0.1. The situation did not occur on any of my test devices but I hope I found the cause by checking the callstack. Please retest asap so I can release the hotfix.
[Android Apps and Games] babylonbwoy:
Tried it, it worked immediately after installation. Now it still force close and can't even launch the app. I can't attach log with tapatalk.

Lt26i Tap-A-Talked

edit : her's the log : http://goo.gl/Xjkzb
[Android Apps and Games] babylonbwoy:
It did !
[Android Apps and Games] chamonix:
There is something very wrong here. The fc happens when processing the available networks to connect to the best one. Unfortunately your logcat was not created by the app so I am missing your access point names. Is there something special in the available access points that may cause this?

I again will try a fix based on the log
[Android Apps and Games] igogold:
It seems BWOF since 1.1 enables wifi on "screen on" even if I have mark at "screen unlock" only.

Example:

17:19:09 C/Turning Wifi on

17:19:09 C/Screen was turned on

16:42:36 C/No wakelock detected

16:42:36 C/Turning Wifi off

16:42:36 C/No tethering detected

16:42:36 C/Alarm received: preparing to turn Wifi off
[Android Apps and Games] babylonbwoy:
I really don't know if there's something special in the access point... I can't open the app so getting the log from it is impossible. Maybe I'll try to delete data to see if it will work.

Edit : I renamed my ISP box some week ago and kept the old SSID in my wifi setting maybe it's because of that ? (it was "NEUF_FFE0" and renamed it to "waree_s box" now I have both in my wifi setting)

Wifi was on, I turned it off and launched BWOO and it worked... I did nothing except turn off wifi...

New Logs :

http://goo.gl/Jhlts

http://goo.gl/qjeyr
[Android Apps and Games] chamonix:
Two entries with the same mac may be the problem. Still there is no reason for an fc so I will fix even if probably no one will run into that problem
[Android Apps and Games] chamonix:
Release 1.1.1.0

I have checked the latest logs from this thread as well as logs/dumps from google play and fixed a few unahandeled errors / fc conditions. Please test if this solves the errors due to renamed access points
[Android Apps and Games] nonplus.nl:
Hi Chamonix,

Your app does exactly what I was looking for, so thanks for that. I do have some problems though. After using the app for a while, I get random WiFi connection drops. WiFi won't reconnect again, and I have to manually switch WiFi off and on again to reconnect. But most of the time the connection is dropped again after a few minutes. I'm sure it's your app, because when I kill it, the random drops disappear. I have no logs to show, as there is no logged activity during the drops.

Using Nexus 7 with rooted stock Android 4.2.1.

If you need more info, please let me know.
[Android Apps and Games] chamonix:
Well if BWOF disconnects Wifi it sould show this action in the log and/or in a logcat. Can you please provide on of those?
[Android Apps and Games] mamouton:
I am having the same issue as igogold. I am using BWOF in conjunction with Juice Defender and couldn't figure out why my wifi was constantly enabled on lock screen. I shut down bwof and it works correctly. I reinstalled release candidate 2 and it is back to working correctly. Let me know if you need anything from me to help figure the issue out.
[Android Apps and Games] babylonbwoy:
Should be ok now, no more fc for now.

Error in french translation about "wifi will be turned off in 30 sec" :

"Wifi ca être éteint dans 30 secondes" instead of "Wifi va être éteint dans 30 secondes"
[Android Apps and Games] igogold:
Changing settings to "screen on" and back to "screen unlock" solves this issue for me. I think it's wrong settings parser.
[Android Apps and Games] chamonix:
Could you please provide a logcat produced with bwof for wifi being enabled on screen on despite setting to enable it on unlock. Also I'd be interested in knowing if you use a third party lock screen or stock
[Android Apps and Games] chamonix:
That may be a clue, I'll check the code on any error in handing those settings as there is a toggle between those prefs
[Android Apps and Games] mamouton:
Do you want me to reinstall the latest version before running the log?
[Android Apps and Games] chamonix:
Whatever version you need to reproduce the problem on. Latest version did not address that so no need to switch versions. Just make sure you save the logcat from BWOF in order for me to have all the info I need (your settings)
[Android Apps and Games] mamouton:
Figured out my issue. The leave only if connected option was checked but the thing is as soon as I turned screen on locked or unlocked it got a connection.
[Android Apps and Games] chamonix:
And exactly that is what I want to diagnose. Please post a logcat created with bwof
[Android Apps and Games] mamouton:
Where are the log files saved for bwof?
[Android Apps and Games] chamonix:
/sdcard
[Android Apps and Games] mamouton:
This link should take you to the file in my dropbox. It was too many characters to paste. Didn't know how to upload a tract file from tapatalk.

http://db.tt/P8FBIFIl
[Android Apps and Games] todivefor:
I turned airplane mode on last night. This morning when I went to my phone wifi was on. I had my phone plugged in, wifi is set to be on when plugged in, AP is whitelisted, and set to be on when whitelisted, disregard airplane mode is unchecked. I would expect wifi to be off with airplane mode on. See attached.
[Android Apps and Games] chamonix:
From the screen-log is seems that wifi has been turned on after the airplane mode was switched on. When airplane mode is on the log says "Airplane mode: do nothing" and this "nothing" would apply for turning Wifi on or off.

Can you please retest if what I said above (that's the may ma phone behaves when I tested it) work for you?
[Android Apps and Games] todivefor:
I ran a quick test. Phone unplugged airplane mode off. Turned airplane mode on, wifi turned off. Plugged phone in, wifi came on. I guess you normally wouldn't have airplane mode on and plugged in at same time, but could be charging off USB.
[Android Apps and Games] chamonix:
Unfortunately your log says: Unable to open log device '/dev/log/main': Permission denied

Edit: I was able to reproduce. #84, fixed and retested on my local build, will be updated soon
[Android Apps and Games] chamonix:
Release 1.2RC1

New release is up, check post #1 for changelog
[Android Apps and Games] wilkster:
This app just keeps getting better. However on my tf101 ics tablet the wifi icon in the notification tray won't restore properly when wifi automatically gets turned back on by BWOF. It is either missing entirely or appears with no signal strength bars. It actually works OK so it hasn't bothered me much. Are others seeing this on tablets running ics?
[Android Apps and Games] patsmike:
Yup seeing this on ICS and JB also
[Android Apps and Games] chamonix:
This happens to me also, inconsistently on different test phones and tablets. It seems that the framework, responsible for updating the notification bar is not doing its job consistently. I know of no workaround that could be implemented in the app to force such a refresh unfortunately
[Android Apps and Games] chamonix:
Any feedback on the fixes / features of 1.2?
[Android Apps and Games] wilkster:
Ok thanks for the quick response chamonix. I figured it was along the lines of what you stated. Since it doesn't impact performance I am not worried about it.
[Android Apps and Games] Pkt_Lnt:
I am having it drop my whitelisted home connection during screen off, cannot tell why. I want to keep it on since this is a VoIP phone since my home cell service is almost nonexistent.

https://www.dropbox.com/s/tq0wwrq6urq4h55/betterwifionoff-2012-12-17_103616518.txt

Here is a second drop while whitelisted.

https://www.dropbox.com/s/j25yl5aw5dsin2v/betterwifionoff-2012-12-17_145949949.txt
[Android Apps and Games] todivefor:
Fixed my airplane mode problem, whereby wifi stayed on when plugged in. Great program!
[Android Apps and Games] patsmike:
No problems yet with #82, working as it should
[Android Apps and Games] chamonix:
Either I don't understand your use case or there is a misunderstanding about what bwof does: if wifi is in use when screen goes off (a wakelock or traffic) it can be configured to retain wifi on. If an app just runs there is no way bwof could guess that that app may need wifi at a later point in time to do keep alive. This is true for the current feature set but I plan to add location awareness using cell towers that could be used to disable bwof at a home location.

Please feel free to comment if I missed your point
[Android Apps and Games] Pkt_Lnt:
I have bwof set to keep wifi on when connected to an SSID in the whitelist, keep on when screen on, keep on when screen off. I also engage airplane mode to save battery, since I am in a very poor cellular area and am using wifi VoIP for incoming and outgoing calls.

I see the "airplane mode, do nothing", but after about 30 minutes, it turns wifi off, even when set to keep whitelisted wifi connected, whether screen on or screen off. This just started with the new release, the ones before worked fine.
[Android Apps and Games] chamonix:
sorry, now I understand the use case. Unfortunately the logcats do no show any activity in that regards. Can you please reproduce and save another log so I can look at the event when wifi disconnects after the screen being off for a while even if connected to a whitelisted a/p
[Android Apps and Games] Pkt_Lnt:
Trying to get one. It tends to go off when I am not paying attention, and I capture a log, but it looks like the others. I've been looking for something like "...... turning wifi off" but I don't see it. I'll keep trying.
[Android Apps and Games] Pkt_Lnt:
Somewhere between 17:55 and 18:47 wifi was turned off or went off, since screen on turned it back on and my sip client registered.

Ok, I cleared the data log before this and started over, here is a log and screenshot. Fingers crossed there is something useful.
[Android Apps and Games] chamonix:
Unfortunately not, there are no events in that logcat.
[Android Apps and Games] chamonix:
Release 1.2

Final release 1.2 is up and hitting gplay
[Android Apps and Games] Pkt_Lnt:
Dang, will try and hook this up to the computer and see if I can get a real logcat that way My only choice now is to fall back a version so that I keep the wifi connection. I'll keep trying to get meaningful logs.
[Android Apps and Games] chamonix:
Release 1.3RC1

New release is up for testing
[Android Apps and Games] chamonix:
Release 1.3RC2

New release is up. See post #1 for changes