[APP][2.1+][15 Jun - 2.1] Better Wifi on/off

chamonix

Recognized Contributor
Nov 7, 2008
4,968
19,142
0
Berlin
Only the icon itself. Sometimes left with whatever icon was present at wifi connect (eg 3G/H/H+) but after a short while reverts to a wifi icon but without animation, then afer a while seems to start animating.

PC tech but Android newbie here so off to hunt down how to generate the requested items.

Edit: Error in WifiStateMachine of "Failed to set country code GB" is all I can see as an obvious error. Now to extract the log...

Sent from my GT-I9100
"Failed to set country code GB" tells me that there is a discrepancy between the country config of your wifi stack and the one from your access point. You may want to try Wifix Manager to adjust the country settings of your phone (different coutries, different channels). Now I can't tell if that is related to the above mentioned problem but may worth a shot
 

LemmingUK

Member
Jul 28, 2012
25
9
0
"Failed to set country code GB" tells me that there is a discrepancy between the country config of your wifi stack and the one from your access point. You may want to try Wifix Manager to adjust the country settings of your phone (different coutries, different channels). Now I can't tell if that is related to the above mentioned problem but may worth a shot
Thanks for that. Will look into it shortly.

Just briefly, found another anomoly in the app. Sometimes convices itself that "the user" turned off wifi when it had done so. To solve this for now I have simply allowed it to turn on even if it did not trn off first.

Sent from my GT-I9100
 

RovG

Senior Member
Jul 17, 2011
315
155
0
...
The Wifi status/notification icon stops animating or showing signal strength.
...
Ok, so when this happens...if I turn off the screen by pressing the power button and then press the home button to wake up the device, animation & signal strength start working again.:eek::)

Sent from my GT-I9100



Sent from my GT-I9100 using xda premium
 
  • Like
Reactions: LemmingUK

chamonix

Recognized Contributor
Nov 7, 2008
4,968
19,142
0
Berlin
Thanks for that. Will look into it shortly.

Just briefly, found another anomoly in the app. Sometimes convices itself that "the user" turned off wifi when it had done so. To solve this for now I have simply allowed it to turn on even if it did not trn off first.

Sent from my GT-I9100
Ok so basically you are saying that "On only when previously on" works inconsistently right?
 

chamonix

Recognized Contributor
Nov 7, 2008
4,968
19,142
0
Berlin

LemmingUK

Member
Jul 28, 2012
25
9
0
In its current state, this app seems to be almost the same as "wifi timeout".

But wifi timeout is much leaner and uses less memory than this app.

I'm excited to see an alternative though and hope it will improve!

Sent from my SGH-I777 using xda app-developers app
That was the app I used previously which did not have all the features I needed such as turn off if no connection, when to turn on etc

Sent from my GT-I9100
 

patsmike

Senior Member
Dec 27, 2011
263
48
0
Boston, MA
Please feel free to suggest any functionality you are missing.
What I liked from "wifi timeout" was that you can chose any wifi delay that you want (instead of choosing from 10sec, 1min, etc).

Another functionality I would loveee to see would be to have the wifi stay on when the phone is turned off or the screen times out during a download/upload (sending large email, etc). There is nothing more annoying than when my downloads don't finish before the wifi is turned off and it just cancels the download or tries to send huge emails using 3g. Maybe have the wifi remain on if the phone doesn't go to deep sleep. Or have the wifi delay start counting down as soon as the phone screen is turned off AND it goes to deep sleep.

Thanks chamonix :D

Sent from my SGH-I777 using xda app-developers app
 
  • Like
Reactions: chamonix

patsmike

Senior Member
Dec 27, 2011
263
48
0
Boston, MA
Also is it possible to cache the service as a background process so that it doesn't take up RAM and runs leaner? I believe this is how the wifi timeout app works.

Sent from my SGH-I777 using xda app-developers app
 

chamonix

Recognized Contributor
Nov 7, 2008
4,968
19,142
0
Berlin
Also is it possible to cache the service as a background process so that it doesn't take up RAM and runs leaner? I believe this is how the wifi timeout app works.

Sent from my SGH-I777 using xda app-developers app
Better Wifi on/off does not run as a foreground service (if it would you would see it in the notification bar but as a stick background service that can be moved out by android.
 
  • Like
Reactions: patsmike

chamonix

Recognized Contributor
Nov 7, 2008
4,968
19,142
0
Berlin
What I liked from "wifi timeout" was that you can chose any wifi delay that you want (instead of choosing from 10sec, 1min, etc).

Another functionality I would loveee to see would be to have the wifi stay on when the phone is turned off or the screen times out during a download/upload (sending large email, etc). There is nothing more annoying than when my downloads don't finish before the wifi is turned off and it just cancels the download or tries to send huge emails using 3g. Maybe have the wifi remain on if the phone doesn't go to deep sleep. Or have the wifi delay start counting down as soon as the phone screen is turned off AND it goes to deep sleep.

Thanks chamonix :D

Sent from my SGH-I777 using xda app-developers app
This is a tricky one as there no way I know of to be informed by android just before the phone goes to deep sleep. Nevertheless I can try to find a way to detect if there is a partial wakelock held at the point in time when the alarm for rurning off wifi after the screen went off goes off. In that case I could reschedule it for later and repeat that operation. This would of course mean that if a partial wakelock is held all the time wifi would never go off.

Edit: added this feature request: https://github.com/asksven/BetterWifiOnOff/issues/2
 
Last edited:
  • Like
Reactions: patsmike

alexinna

Senior Member
Nov 27, 2010
150
56
0
Version 0.2 is up with a few fixes and new features. Check post #1 for changelog.
I'm using SSIII and Wi-Fi sleep policy didn't work as it should. Tried both "Never" and "Only when connected" but still Wi-Fi was up on many occasions. I hope your app will help to resolve this issue.

Version 0.1 had some issue to turn Wi-Fi On after screen unlock. I see you changed something in v 0.2 so I'll try it first before describing my situation.

Also do you think it make sense to stop Wi-Fi even if I'm on 4G? The reason I'd like to stop it because of too many "wlan_rx_wake" wakelocks.
Time will show what is better in my particular case but what do you think should be better in 4G case?

Thanks for all your hard work.
 

chamonix

Recognized Contributor
Nov 7, 2008
4,968
19,142
0
Berlin
I'm using SSIII and Wi-Fi sleep policy didn't work as it should. Tried both "Never" and "Only when connected" but still Wi-Fi was up on many occasions. I hope your app will help to resolve this issue.

Version 0.1 had some issue to turn Wi-Fi On after screen unlock. I see you changed something in v 0.2 so I'll try it first before describing my situation.

Also do you think it make sense to stop Wi-Fi even if I'm on 4G? The reason I'd like to stop it because of too many "wlan_rx_wake" wakelocks.
Time will show what is better in my particular case but what do you think should be better in 4G case?

Thanks for all your hard work.
I have the same device as you :)
For me leaving wifi on is not an option as I travel a lot and can not control all Wifi Hotspots in regards to traffic waking up my phone.
Add to this that I use cell location and Google maps but am not ready to pay for the overhead cause by caching when wifi is on and you have the motivation behind me writing this tool.
What issues did you have turning wifi on at screen unlock? If they persist could you send a logcat?
 

alexinna

Senior Member
Nov 27, 2010
150
56
0
I have the same device as you :)
Good to know. Nice phone. The only problem I have is a battery. It drains 2-3% hourly on idle :(
Hate to see ~60% at the end of working day if I didn't use it much. I just started with this phone but my previous one (Droid X) had an excellent battery life so I never even had a need to use tools like BBS and Wi-Fi was always on at home.

I hope both of your tools together will help me to solve the battery life situation. :)
I'll post in BBS thread in case I wouldn't able to figure out it on my own but if you have some general observations/recommendations on SSIII settings please let me know.

What issues did you have turning wifi on at screen unlock? If they persist could you send a logcat?
On v. 0.1 app failed to turn Wi-Fi ON when I unlocked phone complaining that it was put OFF by user (and I didn't). Changed sleep policy to "Always" and it still complaining occasionally.
Happy to report that so far v. 0.2 works all the time. :)

---------- Post added at 04:24 PM ---------- Previous post was at 03:37 PM ----------

On v. 0.1 app failed to turn Wi-Fi ON when I unlocked phone complaining that it was put OFF by user (and I didn't). Changed sleep policy to "Always" and it still complaining occasionally.
Happy to report that so far v. 0.2 works all the time. :)
Just got the same situation again. App failed to return it to On state. Wi-Fi is OFF now. Here is what I see in a log:
2012-07-30 10:15:03 Received Broadcast ACTION_SCREEN_OFF
2012-07-30 10:15:03 scheduleOffAlarm called
2012-07-30 10:15:03 cancelAlarm
2012-07-30 10:15:34 cancelWifiConnectedAlarm
2012-07-30 11:08:30 Received Broadcast ACTION_SCREEN_ON
2012-07-30 11:08:30 cancelAlarm
2012-07-30 11:08:30 scheduleWifiConnectedAlarm called
2012-07-30 11:08:32 Received Broadcast ACTION_USER_PRESENT
2012-07-30 11:08:32 cancelAlarm
2012-07-30 11:08:32 scheduleWifiConnectedAlarm called
2012-07-30 11:09:02 cancelWifiConnectedAlarm

How can I put in a log everything that is on app console?
Not sure what could put Wi-Fi OFF. I'm using Llama to identify that I'm Home and Wi-Fi should be On. Llama still shows I'm Home.
Any idea?
 
Last edited:
  • Like
Reactions: chamonix