yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] ogilviea:
Testing 1.3RC2...

Widget response to enabling/disabling wifi seems a little inconsistent: sometimes the widget changes to show processing enabled/disabled, sometimes it doesn't. I'll see if I can find a pattern.

I'm still seeing "processing enabled: user turned wifi on" messages when I *disable* wifi. In fact, the only way I can get the "processing disabled: user turned wifi off" message to appear is by manually disabling processing using the widget (in this case, of course, the message is misleading, since wifi hasn't been turned off!).

Edit: Hmmmm... Stopped and restarted the app, and things appear to be working correctly now. I'll report back if I see things wrong...

Edit 2: Looks like the problems may be due to using WiFiWidget to change wifi state. When I use the built-in notification area widget to change wifi state, things seem to work.

Testing continues...

Alan.
[Android Apps and Games] :
@chamonix: Thank you for the nice functional application. The only reason I am not still using this is due to the following question I have. This app manages WIFI and does not touch the data connection. When WIFI gets switched off, data connection becomes active if ON. This will end up burning more power. IMHO, data connection and WIFI management should ideally go hand-in-hand. I therefore end up using tasker/automateit/llama. Tasker wakes up too often and I have reduced it polling cycle using a night profile. Tasker is an overkill to just manage data/wifi. Your application is very specific and perfect - looking forward to hearing your point of view.
[Android Apps and Games] chamonix:
It is correct, when Wifi gets turned off data goes ON if enabled. Now the reason why Wifi is not left on all the time (the whole purpose of this app) is that ideally you are correct and Wifi should be preferred over data. But there is a but, in fact two:

- Wifi being on changes the behavior of maps (more caching is done when wifi is on and there is no way to turn that off)

- many phones suffer from wlan_rx kernel wakelocks caused by access point sending multicast

Now I would be happy to add some data management to BWOF as well if you have a good user story that I could implement
[Android Apps and Games] Yank555:
Hi,

well in fact I second what hackworks says, as I was using JD Ultimate to achieve this, but it just is a bit too heavy for that, plus some things are a bit blurry, hard to tell how it works or what it does exactly.

But in order to use BWOF I needed a companion to handle the mobile data part.

What I used to do using JD was to keep WiFi and mobile data off when Screen is off, but activated data (both WiFi and mobile data, with WiFi prefered) once every 30 minutes only while the screen was kept off.

Now I actually only activate data once every 30 minutes and keep it on for one minute using Smart Data Switch as a mobile data companion app.

But it would be great if it could be handled in a single app of course, plus the approach to leave data on (whichever WiFi or mobile data) as long as a certain traffic is present (as in your app) would be better than just a timeframe (as it's done in Smart Data Switch).

While I'm at this, one nice additional option would be to make the traffic threshold which triggers data shutdown customizable (like x Kbps over y seconds frame).

JP.
[Android Apps and Games] Pkt_Lnt:
Here is a possible solution. Creative Connectivity

http://xdaforums.com/showthread.php?t=2060418

I am using it for data/sync only and bwof for wifi management.

Still having issues at night with keep alive for my SIP calls, but clearing bwof data after upgrade and then check setting has helped. Still get drops, still nothing in the log. :(
[Android Apps and Games] chamonix:
Controlling data by an app like JD causes more harm than good imho. For examples and detailed explanations on that you can check the "better battery stats" thread. In a nutshell turning data off without apps knowing causes apps to run in error handling mode and is a known cause for wakelocks. As long as Android does not offer a place for apps to schedule their need for data connectivity based on central information about when data will be turned on my opinion is that controlling data in order to reduce communication overhead is the wrong way of doing things as this kind of solution tries to fix the symtoms instead of looking for the cause. In the case of BWOF wifi being on is the cause of known harm (see my previous post) but I don't have any plans to work on features hiding symtoms.

That said I am always open to discuss viable use cases.
[Android Apps and Games] Yank555:
I totally agree about JD, which is why I've been lokking for a alternative solution :)

And your BBS is a permanent companion of mine (I've also bought the paid version as I think BBS is an absolute must have on any Android device to get a glimpse of what's going on behind the scenes !).

Also agreed that it would be perfect if Android would provide a scheduled data access, where apps could register to, to be called as soon as data connectivity is available, but well, it's not really in our hands I'm afraid.

I've not been having much wakelocks going the way I do, the switcher disables mobile data as if I turned it off manually or just data connectivity had dropped.

And I do have a few apps syncing (Notes Traveler for work, Gmail, Kaiten Mail with 2 accounts, FB, Appy Geek etc.) and using this really improves my battery life over the day noticably.

But WiFi is more important, as I spent most of my time either at home or at work on a usual workday, and I have WiFi connectivity on both sites, so leaving WiFi on all the time is a no-go for the battery in my case.

Just as one occurance of a cycle as showcase, here's what I got using JD at the time, which we agree is far from an optimal solution :

http://xdaforums.com/showpost.php?p=34465084&postcount=5

JP.
[Android Apps and Games] todivefor:
Delete
[Android Apps and Games] Pkt_Lnt:
That makes a whole lot of sense. Not knowing the deep inner working of Android, I never thought of that. I disabled the app I posted above.

I learn plenty here, everyday. Thanks
[Android Apps and Games] chamonix:
v1.3 is rolling out to gplay
[Android Apps and Games] :
From a functionality perspective, I like green Power. But, I prefer bwof for wifi control. If you want to disable data, you need to first disable auto sync to avoid the error path and resulting wake locks as @chamonix mentioned.

My use case is I want to shut wifi and data at night. Another use case would be if data signal is very weak, I would want to disable when screen is off. We can log all applications that still keep waking device when data is off and sync disabled. Wonder if android provides a callback when Internet connection is available and use that mechanism instead of apps in a retry loop.
[Android Apps and Games] Pkt_Lnt:
Hopefully this log will show why I get wifi turned off when I have it set to stay on when connected to my whitelisted home network for voip/sip calls. BWOF 1.3.0 RC2

You can see in the screen shor that somewhere between 8:37 and 9:08 wifi went off from the fact that "screen unlocked" and "wifi turned on" shows while before "airplane mode, do nothing" is shown, which means it stays connected.
[Android Apps and Games] MichunB:
will BWOF include location in its algorithm? why not join it with altitude?
[Android Apps and Games] chamonix:
Yes I am planning to: https://github.com/asksven/BetterWifiOnOff/issues/11

The problem with ALTitude is that its location does not have semantics. What we need here is some geofencing algorithm telling the app that you are in a "place". I was thinking of a way to implement that as a general service that would broadcast the arrival/departure from a place to other apps and BWOF may be the start of that implementation that could be extracted later to live as a general service.

I have started working on BWOF 2.0 with some nice enhancements like pull to refresh and I am thinking about making some tests to see whether my own implementation of cell tower location would be more energy efficient that what ALTitude uses. I have code to do that from an old project so it's a matter of a few hours to put that together. Don't except anything very fast though, I have to finish a new version of BBS first.
[Android Apps and Games] chamonix:
What puzzles me is that the log starts with the event of detecting Wifi being turned on as if BWOF was not running previously. There are two reasons I see for that:

1. you have a task killer app running

2. your memory management is that agressive that it kills the BWOF service

If 1. is not the case you may want to try running BWOF as a foreground service and provide another log when that happens again so we can see if BWOF triggers Wifi to go off.
[Android Apps and Games] Pkt_Lnt:
No task killers, I let android manage itself. It is a very simple, minimally customized AOSP based ROM I use. I'll enable foreground service, I suspected that it was being killed, but no rhyme or reason I can see.
[Android Apps and Games] Pkt_Lnt:
Finally happened after hours of success. fingers crossed that we get some clue.
[Android Apps and Games] V0odo0 Dev:
Works great on my HTC. Thx!
[Android Apps and Games] chamonix:
Unfortunately no, the logcat starts with the "on" event so still no clue about the "off". Could you try to save a logcat by other means (e.g. adb logcat -v time)?
[Android Apps and Games] Sunshine live:
Great App!
[Android Apps and Games] walie:
I have a weird problem on my Note2. When betterwifionoff is enabled, my phone connects to my wifi network fine and wifi stays on. However after a short period of time, with the screen still on, the phone reverts back to 3g/4g but wifi is still on. This only happens when betterwifion/off is controlling the wifi state, when its disabled and wifi is manually turned on, the phone keeps the connection

any ideas? thanks for the help!
[Android Apps and Games] corrsea:
I've had this issue forever on my sgs3. It's very intermittent though, and like yourself I once thought it was related to better WiFi. However I've also experienced without the app installed.

ROM Sotmax Ultimate V12

Kernel Yank555.lu-V2.8g
[Android Apps and Games] chamonix:
Only a logcat can give us a hint about what happens to the connection. I have been experiencing similar problems when my wifi coutry standards were not set properly, ending in a mismatch of the channels used.
[Android Apps and Games] deadman3000:
Just a note to say I also experience the vanishing wifi icon or no bars bug. Annoying to say the least but otherwise wifi seems to work OK. Anyone know of an alternate wifi icon that can run in the status bar and show signal strength?
[Android Apps and Games] Yank555:
To my knowledge that won't help, signal is reported wrongfully (I have a widget and it confirms the icon) and I've seen that happening on my HD2, my Sensation and S3.

If you switch screen quickly off and on again it will be fine. Never found a solution except not use a WiFi autoswitcbing tool :(

JP.

Sent from my custom Sotmax V12 / Yank555.lu SGS3 kernel v3.0a Aroma (Linux 3.0.57) powered Galaxy S3 i9300 using Tapatalk 2
[Android Apps and Games] Melhisedek:
That is exactly what I'm suffering from. Battery is great when I'm not connected to my wifi router (Dlink DIR-655) and/or connected to any other router for that matter. But if I'm at home drain can range from 2-9% per hour while idleing.

I've tried your app and it works perfectly *knock on wood*, but I wonder if there is anything I can about my router to lessen the impact on battery even without your app. I've done some reading and searching and it seems that DTIM setting in router can help but person suggesting it used highest possible value of 255 which I think is a bit to much.

So any ideas from the master himself? :)

Thank you for your time and keep up the good work!
[Android Apps and Games] chamonix:
If you control the network you are connected to there are ways to limit this. Using wireshark you can capture the traffic, find the source and try to configure it to avoid that. Often it is upnp traffic causing those wakeups/wakelocks. I m no wire shark specialist but a search for 'wireshark' in the bbs thread may help. There are also kernels implementing a multicast filter in their wifi driver control so if you have a custom kernel you may want to look in your favorite kernel thread as well.
[Android Apps and Games] Melhisedek:
Are there any router settings I can try and check out as I'm still not comfortable with using different kernels (got my first Android like 2 weeks ago)
[Android Apps and Games] chamonix:
There are router settings but most importantly settings other devices in your network that you may need to change. I wouldn't recommend doing anything blindly though but proceed based on a wireshark network trace.
[Android Apps and Games] ogilviea:
Is there any way to get the app to switch off wifi when connection to a whitelisted AP is lost and the screen is off (like 'WIFI Power Saver')? This is a common scenario for me: I leave home, having forgotten to switch off wifi and, next time I turn on the screen (possibly hours later), I discover that wifi has been on all the time, despite being in areas with no wifi coverage.

Alan.
[Android Apps and Games] Thomas_BA:
I think it does that already. You probably see WiFi connected because as soon you unlock the screen it starts WiFi immediately. So check the log what happened before.
[Android Apps and Games] ogilviea:
No, the wifi is definitely on before I turn on the screen: I can tell from the graph in GSam Battery Monitor. Plus, this app's log shows no indication that wifi was switched off.

Alan.
[Android Apps and Games] chamonix:
It is supposed to do that already so I would be interested in getting a logcat with that exact situation. I will try to reproduce as well but I have no wifi at hands to connect to for a few days.
[Android Apps and Games] Mushroom.:
I'm using CM10.1. After the screen comes back on, the app seems to turn on wifi properly, but doesn't seem to want to actually connect to the AP (which is whitelisted.) In the wifi settings of CM, it sees the AP, but says "Disabled" as the status of the AP ("Disabled" not referring to the status of the actual wifi itself.)

I can tap and tell it to connect to that AP anyway, and it does it successfully, just can't figure out why it's not connecting to the AP properly after correctly turning wifi back on.

Any thoughts on this?
[Android Apps and Games] ogilviea:
Hi Sven,

Logcat will be difficult, since my logs are suffering with

http://code.google.com/p/android/issues/detail?id=39723

but I'll try...

Alan.
[Android Apps and Games] chamonix:
I have had this behavior on cm10.1 when the Wifi country settings were not correct. Wrong settings or discrepancies with the router's settings will cause the wrong channels to be used and looks like a connection attempt failing.
[Android Apps and Games] ogilviea:
<sigh> Sorry Sven, getting a useful logcat is proving impossible, given the known bug I referenced earlier. Is there any other debugging I can perform? Wifi remaining on after leaving a whitelisted area is 100% reproduceable on my N4.

Alan.
[Android Apps and Games] chamonix:
I am back home so I can try to reproduce it. Could you still save a logcat from the app so I can look at the header where your preferences are listed in order to configure my phone in the same way an try reproducing.
[Android Apps and Games] ogilviea:
Re: [APP][2.1+][01 Jan - 1.3] Better Wifi on/off

Logcat and debugging log sent via email.

Alan.
[Android Apps and Games] NiXAi:
not working on Resurrection Remix 3.1.3/Dorimanx 4.71. Wifi stay On
[Android Apps and Games] chamonix:
Would you mind posting a logcat?
[Android Apps and Games] chamonix:
Release 1.3.0.1

I have uploaded a hotfix for a specific problem occuring when BWOF is set to leave wifi connected when screen goes off and wifi is connected to a whitelisted access point: in that case wifi was not turned off when that connection was lost. After a positive retest that version will got to google play.
[Android Apps and Games] ogilviea:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

Looking good so far... :)
[Android Apps and Games] Thomas_BA:
Looking good so far.

Just recognized one thing. My phone connects to Wifi Spots even they are not marked in the Whitelist. Normal or a bug?
[Android Apps and Games] chamonix:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

That depends on your settings. If you have enabled bwof to keep wifi on only when connected to a white listed a/p it will not prevent the connection but wifi should not stay on. In case of doubts please post a logcat
[Android Apps and Games] Sikac101:
I found this app today and I'm testing it. So far it seems its working, switching off Wifi on and off while when screen is off and when not plugged in. I will post some more feedback in a day or so. Thanks.:good:
[Android Apps and Games] patsmike:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

So I have the setting "turn processing on when WiFi is turned on". But in the past couple days, this has caused the processing to turn on even though I continuously turn it off via the widget. The log also shows funky things like this:
[Android Apps and Games] chamonix:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

Could you possibly attach a logcat?
[Android Apps and Games] boobiestar:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

I encountered that when I turn the screen on, that I see that BWOF say that I turn the screen off (10.30.16). After that I see the notification: scheduling wifi off after 30 seconds. Wifi is then still off. When I unlock the screen (10.30.21 right notification) wifi is switched on.

Another strange thing is when I turn the wifi toggle off, BWOF recognised it as user turned wifi on. When I turn the wifi toggle on, BWOF recognised it also as user turned wifi on (right notification).

Logcat

http://db.tt/6lcPybN5

Update

Tomorrow I discovered that when the screen of my tablet is off, but the tablet is not locked, and I turn the screen on, the wifi not turns on. I have to manual turn on the wifi toggle.

Verstuurd van mijn GT-N8010 met Tapatalk
[Android Apps and Games] patsmike:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

So I cleared the app's data and cache... Haven't seen the problem since then.

Another problem that I'm seeing that you can easily recreate: if using the setting "turn on processing when WiFi is turned on" and I turn on WiFi (while processing is off), the processing won't turn on unless there is a network that I connect to (eg. If you make your phone forget the WiFi networks that it would usually automatically connect to)

Thank you
[Android Apps and Games] patsmike:
Oh ok, I was finally able to get a logcat.

This time, wifi handling was turned on the whole time, but when I unlocked my phone and wifi started back up, bwof is repeatedly trying to turn on handling again... attached is a picture of the bwof log and a logcat. I tried turning off my screen several times, but it kept being wakelocked, so you may see several instances of bwof, but the last one should have been the one where this happened.
[Android Apps and Games] chamonix:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

Reproduced and fixed. Expect a release tonight
[Android Apps and Games] patsmike:
Re: [APP][2.1+][20 Jan - 1.3.0.1] Better Wifi on/off

You're awesome. I'm gonna purchase your bbs since you don't have a donate version of bwof
[Android Apps and Games] chamonix:
Hotfix release 1.3.0.2

New version is up fixing the duplicate and inconsistent log entries when enabling/disabling wifi. This version will go to gplay once I get positive feedback about this fix
[Android Apps and Games] chamonix:
Thanks for the support. A "support the dev" version of bwof will be available together with version 2.0 (already under construction). The free version will still stay fully featured (users who know me also know my principles) but with ads.
[Android Apps and Games] Thomas_BA:
Awaiting v2 to support you. Well deserved.
[Android Apps and Games] akarol:
Re: [APP][2.1+][23 Jan - 1.3.0.2] Better Wifi on/off

You should have bought BBC way before this app was even around. I can't live without it.

Sent from my amazing Nexus 7.
[Android Apps and Games] p107r0:
BBC as in here? :p
[Android Apps and Games] chamonix:
Any feedback on 1.3.0.2? I'd like to hear if the fix helped in order to release to gplay
[Android Apps and Games] patsmike:
Re: [APP][2.1+][23 Jan - 1.3.0.2] Better Wifi on/off

The problem that you fixed in 13.0.2 is definitely fixed, but I'm seeing another problem that I mentioned but I think you may have missed:

Its quite easy to reproduce: if using the setting "turn on processing when WiFi is manually turned on", and if I turn on WiFi (while processing is off), the processing won't turn on unless there is a network that I connect to - so If you make your phone forget the WiFi networks that it would usually automatically connect, you can reproduce this effect.
[Android Apps and Games] Thomas_BA:
For now no problems at all!!
[Android Apps and Games] chamonix:
https://github.com/asksven/BetterWifiOnOff/issues/94

Edit: looking for a quick fix for that. If I find one I will release 1.3.0.3 for testing, if not I will push 1.3.0.2 to gplay and return to that new bug in the next release
[Android Apps and Games] chamonix:
I have tried to reproduce by removing all my a/p data as you suggested but can not reproduce: BWOF enables the processing as soon as I turn on wifi. There is one thing that may be the cause of the problem you observed. The user actions only apply when BWOF previously did the processing. E.g. when you turn wifi on the check is if the previous action by BWOF was to turn wifi off. If that is not the case nothing happens. The same for disabling: BWOF will only take the user "off" action into account if Wifi had previously been turned on by BWOF.

Can you please try to reproduce and provide a logcat if you still feel there is something wrong.
[Android Apps and Games] chamonix:
Release 1.3.0.2

The hotfix release 1.3.0.2 is rolling out on gplay
[Android Apps and Games] patsmike:
Re: [APP][2.1+][23 Jan - 1.3.0.2] Better Wifi on/off

I can't reproduce it anymore sorry :) I don't thinkkk the problem was what you mentioned, but who knows, I was just screwing around testing the functions randomly... I'll get a logcat if it happens again. Thanks for looking into it :)
[Android Apps and Games] boobiestar:
Re: [APP][2.1+][23 Jan - 1.3.0.2] Better Wifi on/off

Hi Sven,

Version 1.3.0.2 solved some issues as multiple same notifications and wrong Wifi state. Nice work :thumbup:

Following issue is still there:

Also I encountered the following: when power is connected and Wifi cannot connect to an accesspoint the wifi is turned off and don't stay on. That is strange, because the option Wifi stays on when plugged in is selected.

Maybe you can look at them.

Verstuurd van mijn GT-I9300 met Tapatalk
[Android Apps and Games] chamonix:
Do you have configured Wifi to stay on only when connected to a whitelisted A/P. If yes it is normal that even on power wifi will turn off when no whitelisted access point is connected to.

For the first issue you mentioned: I need a log of those events. If I read you correctly your screen was not locked and this has certainly nothing to do with BWOF. Depending on the prefs this may also be the cause of wifi not turning on (if you prefs are set to turn wifi on at screen unlock)