yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Sokota:
Feature Suggestion

Hi Xenon O

Congrats for your app.

Let me suggest that it would be great if you added a wifi roaming functionality which is a known problem with android.

I think it makes sense this functionality in your app because if the connection has a weak signal then more juice will be lost.
[Android Apps and Games] Xenon O:
Android 4.0+ is now supported! This update fixes some problems too!

If you are experiencing high battery usage, please activate Legacy Scan mode in Settings. This app normally uses Android's "scan always available" function, which normally keeps WiFi active at a very low-power state. On some devices, that seems to be broken, and WiFi is kept always on at full power.

I'll look into it, but from what I know about WiFi roaming, it sounds like something that would be impossible with Android's WiFi, since you need to disconnect before you can attempt a new connection.
[Android Apps and Games] Sokota:
Please check Wifi Roaming Fix app that implements wifi roaming:

https://play.google.com/store/apps/details?id=com.heleron.wifiroamingfix&hl=en
[Android Apps and Games] racingmatt1:
So will I still need to have WiFi scanning always available turned on?

---------- Post added at 06:41 PM ---------- Previous post was at 06:40 PM ----------

So will I still need to have WiFi scanning always available turned on?
[Android Apps and Games] Gu$houn*:
I forgot one little suggestion:

It would be nice if there would be displayed somewhere in the app its version, probably in /about, because as it's currently not shown I had to find that out via titanium to know what version I'm on to compare changelogs.

v1.1 works fine, btw.

P.

[sntfrmnxs4]
[Android Apps and Games] EvilDragonEX:
its connected and in range
[Android Apps and Games] Xenon O:
Thank you. I'll look into it and see what I can do. Thank you for the request!

In legacy mode, you should turn it off to save battery. In normal mode, yes, it should still be turned on, and if your manufacturer did well, this setup should be using less power overall than the legacy mode.

Thank you for the suggestion, will be part of the next update.

So you're saying it just turns off WiFi while you are connected? How long after connecting to WiFi does that happen when it happens?
[Android Apps and Games] racingmatt1:
What would recommend for a good refresh interval that doesn't waste battery too much?
[Android Apps and Games] Xenon O:
As I said in e-mail: That depends on how important it is to you that you are reconnected quickly. I can't really make a recommendation here as it depends on your personal preferences. I like two minutes best.

Sorry, I really can't give an answer to suit everyone here, it depends on what's more important to you.
[Android Apps and Games] huei92:
sorry for the late reply, was busy with my work.

I tried to create a similar task using tasker : 0800-2359, the device switch on wifi if it is in range to a particular network, wifi off when out of range. However, due to my inexperience in programming/ android skill, I wasn't able to do that (tried myself but due to many constraints, it does not work ideally).

from what I can see from your app is that it will turn the wifi on when the network is in range during midnight. This would be battery consuming (might not be much though)

hope you could understand the message that I tried to deliver
[Android Apps and Games] Xenon O:
I understand. You might see such a function in a future update. Until then, you can use the widget to turn off WiFi Better Battery at night. :)
[Android Apps and Games] khuy21:
Just found this app today, give it try now..will report if find any issue...:thumbup:
[Android Apps and Games] Darke5tShad0w:
Hey [MENTION=3095725]Xenon O[/MENTION],

This app sounds awesome but I have a question for you.

I use Leandroid by [MENTION=2584205]Flyview[/MENTION] which I have set to turn wifi off when the phone sleeps then reactivate it on phone unlock. How would this affect/conflict with leandroid? (There are more advanced features that It might also affect but I don't use those at this stage).

Maybe you and Flyview could work togeather to make your apps compatible with each other for ultimate battery saving?

Heres the link to leandroid

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

Thanks
[Android Apps and Games] Xenon O:
I honestly haven't tried it in combination with other power savers yet, but it would probably conflict. You could try it out though and tell me how it goes if you have the time! :)

A planned feature is disabling WiFi and Auto connect while the display is off though, so once that's out, they will definitely be compatible (or if that's the only feature you're using, you'd only need WiFi Better Battery).
[Android Apps and Games] Darke5tShad0w:
Thanks for the quick reply, I also use it for data, bluetooth and gps.

I'll try testing it for you sometime this week and let you know.

Also Im halfway through reading this whole thread and from what I read im thinking this app makes use of the wifi always scanning feature? I no it got mentioned 2 pages back but its not clear to me.

If so how will it be affected when this option is turned off?
[Android Apps and Games] Xenon O:
If the option is off, it will fall back to legacy scanning - that means turning off the WiFi every X (setting) minutes, scanning, and turning it back off. Usually scan-always mode is more power-efficient since it only puts the WiFi module into a very low-power state.
[Android Apps and Games] Darke5tShad0w:
Damn it you beat me I was just about to edit it as I found the answer on page 5.

Thanks for answering me again anyway :).

Edit. What about an option to check for networks on screen on or preferably on phone unlock?

eg it turns off when screen turns off (by other means) but when unlocked it then scans and either activates/deactivates depending on whats found.

Sorry for hassling you Im just one who likes fine control.
[Android Apps and Games] Flyview:
Yes, they'll probably conflict, but only with the WiFi toggling.
[Android Apps and Games] Gu$houn*:
Hey [MENTION=3095725]Xenon O[/MENTION],

new strange thing happened, after waking up my wifi connection was gone, if I enter the app it was saying "no networks have been saved yet" so I had to save my network again and it was like for the first time, MAC popup etc. The only thing I could say is it had to be working for some time after I fell asleep because there was new notifications ... that's all I can provide. Strange ...

P.

[sntfrmnxs4]
[Android Apps and Games] Elanzer:
I tried this on my Droid 4 running Slimkat 4.4.4, it properly disables and enables wifi when I'm around my home AP, but it appears to be a battery drainer for me.

This was running the default 2min interval without much use besides a couple short voice calls for the first 5 hours of my shift at work which has no wifi. It shows only 2 seconds of CPU active time in the details, there was no actual wifi use during this charge besides unplugging it while it was connected to my AP, throwing it in my pocket and leaving home, wifi shows as off but the "low power" scanning mode seems to use just as much juice as leaving wifi enabled, if not more.
[Android Apps and Games] Xenon O:
That's not just strange, that's on the "what the hell?" level. All networks are stored in the internal database, and the literally only place where a network can be deleted is in the Networks fragment, by pressing the button. Were all the settings gone too? Maybe the whole app was reset for some reason?

How strange. So it shows extreme battery usage, but no reason whatsoever? Did you try the Legacy scanning mode? Maybe your device is one of those where the supposed "low-power" mode is misconfigured by the manufacturer and is actually just full-power WiFi. If/when you try out legacy mode, please make sure to disable the "scan always" mode in the Advanced WiFi settings.
[Android Apps and Games] EvilDragonEX:
yep :D but after updating the app from play store... everything works fine...

if i want to add a new wifi into auto connect... do i have to open the app and set it to auto connect first or i can just turn on my wifi and let it auto connect and go into the app to add into the list?
[Android Apps and Games] Dovidhalevi:
Might need to try this option as well! However, the app is not the only one using the scanning and others, such as "location" do not seem to run afoul of it. Indeed, they call this a battery-saving mode. Wonder how much more I can do with Tasker and iwconfig.
[Android Apps and Games] tralchonok:
The idea isn't new, but avoiding of using GPS is quite interesting! Thanks, I'll definitely will check this out!
[Android Apps and Games] Gu$houn*:
I didn't have to type my password again, just the app was all clear, wifi settings was untouched so probably some unexpected error occurred ... I don't know ... the only thing coming to my mind is that I'm dualbooting two ROMs and switching them so maybe there would be done potential to get wrong ...

P.

[sntfrmnxs4]
[Android Apps and Games] PetGS:
It is interesting, I just have one question

It is interesting, I just have one question (I can't se any answer to that, I hope I haven't missed it): How big are the savings? I mean: Did you meter how much of the capacity does this app save in different use scenarios, on different smartphones etc.? I am pretty sure it would be a great argument to install this app.
[Android Apps and Games] Xenon O:
You need to open the app and set it to auto connect. If you turn on WiFi without a known network nearby, WiFi Better Battery will likely just turn it off again to save battery.
[Android Apps and Games] Xenon O:
Your password is stored in Android's settings, not in WiFi Better Battery. If the app was completely empty, its data was probably cleared.

No, I don't really have data on that, especially considering how awful Android 5's battery usage display is. :/
[Android Apps and Games] Gu$houn*:
Yeah, I know that and that's what I thought, but I'm just curious, why ...

P.

[sntfrmnxs4]
[Android Apps and Games] Sullivan72:
Good app

Nice job.
[Android Apps and Games] tralchonok:
Dear author! [MENTION=3095725]Xenon O[/MENTION]

Is it possible to implement "Force WiFi Switch OFF" option? Let me explain:

Typical scenario: I go to sleep at 23:00, wake up at 8:00. My home Wi-fi router works all this time. So, your app will hold WiFi enabled on my phone. It drains the battery.

I'd like to be able to specify in settings the time interval 23:00-8:00 as "Force WiFi Switch OFF" interval (It means, your app should disable wifi on my phone from 23:00 to 8:00).

What do you think? (Keep in mind, 5 stars on Google play and unlimited rays of happiness from me are guaranteed!)

P.S.: I also may translate this app into Russian if you send me your strings.xml
[Android Apps and Games] Xenon O:
Thanks for the suggestion! For now, you can use the widget to temporarily disable automatic WiFi control. One of the next updates will contain planning functions to automatically disable automatic WiFi control at certain times.

And thank you for your offer! You can find the strings here: https://github.com/CanisLupusXenonis/MNDStrings
[Android Apps and Games] tralchonok:
[MENTION=3095725]Xenon O[/MENTION], yep.. I can use "Power Toggles" widget to control my wifi manually. I am talking about the possibility of COMPLETELY AUTOMATIC wifi switching.

I guess, the most typical scenario for 99% users it something like that:

- You have Home wifi

- You have Office wifi

- You sleep every day 6-9 hours

Now we can automate first 2 options, but 3-rd option we still have to control manually. That's the point...

P.S.: I'll make a pull request on Github when translation is done.
[Android Apps and Games] Xenon O:
Yeah, like I said, this automation will be part of one of the next updates! And until then, you can use the WiFi Better Battery widget to turn off WiFi during the night.
[Android Apps and Games] racingmatt1:
I'm still having battery issues but not as bad as before. Before the update using WiFi scanning always available it drained from 100% to 60% in 4.5 hours with no usage. Today using legacy scan it drained from 100% to 80% in the same amount of time as before and in the same location. What should I do now?
[Android Apps and Games] Xenon O:
Hmmm...sorry if I asked you this already, but what's your scanning interval set to?
[Android Apps and Games] Dovidhalevi:
Actually, since WIFI battery drain is endemic in kernels used on my dinosaur, I remember keeping the scan-always option off while running cm10.2. Made a large difference. Since running 4.4.4 omnirom, had not page attention to this option. Did previous versions of the app simply turn it on or was it simply on all this time with no ill effect? I turned it off, started the app, got a dialog to turn it on, denied, and got legacy scan option checked. Google Now requested turning it on for better location accuracy--had not seen that message in ages.

Any, as another poster has related, battery is still a problem. The app did not reconnect me.

Potentially more serious--please check for memory leaks.
[Android Apps and Games] Xenon O:
Honestly not sure what you mean. Does it still have high battery usage? What's your scan interval? Are you running any other battery savers/task killers that might interfere?

Should have very few to no leaks, but I will. Eclipse was so much better about detecting leaks than Android Studio is, so I might have missed some. I'll run some tests.
[Android Apps and Games] tralchonok:
[MENTION=3095725]Xenon O[/MENTION], I've encountered a bug today. Your app disables WiFi correctly. But it CAN'T enable it! I don't know why, but in my system WiFi manager I see the "Authentication failed" error. Your app doesn't show any error though...

It fixes when you open the app and reconnect to the network from there. Try to set up the wifi password like "HgdyTheaser5" and test, maybe it depends on this?

Nexus 5, Android 5.0.1 (stock). Nova Launcher installed (App settings: interval 30 secs,Open drawer: off, MAC check: off, Auto wifi manag: ON, Legacy mode: ON).

And the 2-nd question - what method do you use to implement the periodic checks? I don't see your app in "Running" list, so it's not a service. Also I don't see it in the "Accounts" sections. Do you use AlarmManager?
[Android Apps and Games] Xenon O:
1) I have gotten a few reports that it won't connect to WiFi but disconnecting works (even though it seems to be working fine for most users) and am looking into it.

2) Yes, an AlarmManager to not to require a constantly running service.
[Android Apps and Games] Rickyzx:
I have just downloaded your app. I haven’t used it yet. Can you provide me some information about your app? If I use your app, is it necessary to turn-off Bluetooth?
[Android Apps and Games] Xenon O:
All you need to know is in the description and in the in-app Help. :) You do not need to turn off Bluetooth.
[Android Apps and Games] Xenon O:
Version 1.2 is now available! This should fix the connection problems some people were having. I'd appreciate some feedback on whether it works now :)

The update also introduces new features, many of which were requested in this thread.
[Android Apps and Games] tralchonok:
Thanks for this update! The connection problem still exists. I also tried to re-install app.

"Authentication error" pops up very often. Maybe it's because of my router's MAC-filtering?

Do you change device's MAC during the connection attemp or you provide the original one?
[Android Apps and Games] Xenon O:
Where does it say authentication error? MAC filtering shouldn't be affected by my app, as the MAC of your phone stays unchanged.

Does it work if you disable the automatic WiFi management in my app and try to connect using Android's WiFi manager?
[Android Apps and Games] Sojourner353:
I suffered this problem also on my home network, happened a few times and I since have uninstalled it.
[Android Apps and Games] Xenon O:
Sorry to hear it didn't work well for you.

What problem did you mean, the authentication error?
[Android Apps and Games] tralchonok:
Ok, I'll try to provide more details:

1) Switching off my router. App works fine: disconnects & disables WiFi module on my Nexus 5.

2) Switching router on. Time interval is 30 secs. Waiting a couple of MINUTES, nothing happening.

3) Opening system WiFi settings. Switching it on. It shows now my network with a description "Authentication failed". Tapping on my network here, clicking "Connect" - it connects!

So, I guess, your connection-algorithm isn't perfect and differs from the system connection algorithm.

Anyway, the problem exists and replicates constantly :(
[Android Apps and Games] Xenon O:
Thank you for your extensive reply!

It's strange that this occurs though, because my app in fact does not use a custom connection algorithm, it just tells the system what network to connect to.

I'll look into it though, I hope I can replicate it. Does this only happen when you turn your router off and on or in other cases too?
[Android Apps and Games] rogxd:
For me this app works very well! Thanks!

Samsung Galaxy S5 Lollipop
[Android Apps and Games] tralchonok:
In all the cases.

I'll try to disable MAC-check on my router's side and will make easier password.

I'll also try with another router, maybe it's some kind of trouble with my router, I don't know it for sure yet...

If anything changes or I figure something out, I'll let you know.
[Android Apps and Games] Xenon O:
Thanks for testing. Which Android version are you on? If >= 4.3, legacy mode or not?
[Android Apps and Games] tralchonok:
5.0.1, legacy mode On
[Android Apps and Games] Xenon O:
Could you try without, to see if that's the cause of the problem?
[Android Apps and Games] Xenon O:
This problem should be fixed with the new version 1.2.2. I'd appreciate it if you'd let me know whether it works now :)
[Android Apps and Games] tralchonok:
I'll check it soon. Tell me plz what have you exactly fixed ?(interesting:))
[Android Apps and Games] Xenon O:
It's hard to put it into words, really. Android's WiFi is just strange. And I had a few bugs in compatibility mode which made it disconnect or not connect at the wrong times, which should all be fixed now.

The "authentication error" thing seems to be an Android bug (or intended? would be kind of strange though) that's triggered by trying to connect to networks too quickly after turning on WiFi.
[Android Apps and Games] tralchonok:
I've tested it on 2 devices and 2 different networks. It connects. But now it doesn't disconnect when WiFi disappears!:what:

Android 5.0.1 and 4.4.2, interval 30 sec. Legacy mode: doesn' make any sense.
[Android Apps and Games] Xenon O:
Let me ask you: How far out of the range of your WiFi network did you go?

Once again, there's something a bit strange about Android's WiFi. It can detect networks further away than you would think, but under a certain connection strength it just refuses to connect. This means that my app doesn't turn off WiFi though, since a saved network is nearby. The problem is that there's no way to tell what the minimum required strength for a connection is, so I can't prevent these "false positives".

What I'm saying is: If you just barely went out of the range of your network, please try going a bit further.

What did you mean by "Legacy mode: doesn' make any sense"?

Thanks for testing!
[Android Apps and Games] tralchonok:
I turned router off, not went out of range... I noticed the strange Android behavior too - when my router is off, system WiFi settings show that my network is still in range :confused:

But it also can disappears immediately...

Feels like the system caches WiFi network availability with some kind of sneaky algorithm :confused:
[Android Apps and Games] Xenon O:
That is really extremely strange. Not that I don't want to be of help, but if Android thinks your home network is still around, there's little my app can do about it :/

Generally, Android's WiFi implementation seems to be completely borked.
[Android Apps and Games] Xenon O:
Hmmm. Is MAC check on for you in the app? Maybe that makes a difference.
[Android Apps and Games] Dovidhalevi:
The normal tx power for the WIFI is 32 (do not know what units). From some forum on XDA, suggestion was made to use 11 so, as I stated, have tasker run a script for iwconfig to set the power level to 11 whenever WIFI turns on. Do not know if that really saves me battery but every little bit ... and WIFI works just fine.

For the continuous scan option when WIFI is technically "off," what would be the tx power? On my device, it simply runs full force so I need to use the "legacy" option. Would the same type of tasker script to set a very low power, i.e. 2, when WIFI is off re-enable the scan option and have that save battery as intended??
[Android Apps and Games] Xenon O:
Well...I honestly don't know. I'd say setting it to a low level when WiFi is off should work. I'll look into how setting power is possible and see if I can include it in my app too. Just give it a try :)
[Android Apps and Games] Dovidhalevi:
Great!\

iwconfig is a command line tool, place in /sytem/bin or xbin. Can be executed in Java code.
[Android Apps and Games] Xenon O:
Thanks for the hint, already found that. :) Since I have no rooted device, would you be willing to test that?
[Android Apps and Games] Dovidhalevi:
Sure.

Please double check for memory leaks because I've had to freeze that app because of memory running down.
[Android Apps and Games] Xenon O:
[MENTION=4708203]Dovidhalevi[/MENTION], my dev version now includes root settings. How would you like me to send the APK?
[Android Apps and Games] Xenon O:
Should be fixed with the new version (1.2.3)!
[Android Apps and Games] rogxd:
@ Xenon O

In my opinion the app must be deactivated when the device is set offline (airplane mode), because in this situation we never need any connection (for example by night we can set airplane mode instead to switch off the device).

In addition, when we are under a saved network would be useful the opportunity to manually switch off and on the wifi.
[Android Apps and Games] tralchonok:
Seems like it works for me now! Thanks!
[Android Apps and Games] Xenon O:
Good idea. Will be part of the next update!

Not sure what you mean, could you please elaborate?

Awesome! Thanks for reporting back :)
[Android Apps and Games] tralchonok:
Scheduling doesn't work.

I set up the time interval from 00:00 to 07:00. App switched WiFi off at 00:00, but then after 30 secs it switched WiFi ON again.

Now it's 00:02 and WiFi is still enabled.
[Android Apps and Games] rogxd:
If I'm connected to an allowed network and I need to disconnect temporarly (and if necessary to reconnect after) by press the wifi toggle I can't, because your app reconnect to the same network instantly.

Another thing: in "wifi manager" of your app, would be useful to show differently the free wifi and the private wifi.

Tnx ;)
[Android Apps and Games] Xenon O:
Thank you, I'll look into it.

Does disabling the setting "Automatic WiFi management" or using its widget do what you want?

You're right, I'll add that! Thanks!
[Android Apps and Games] Dovidhalevi:
Experiments with iwconfig

If WIFI is off, iwconfig does not even "see" wlan0 which is our WIFI.

If continuous scan is checked and WIFI is off, wlan0 is there (and on my phone, at whatever tx power level it had before). Bye-bye-battery.

So I made a tasker script to set the power to 2 dbm to see what happens. The script works, but then iwconfig shows a tx power level of 0 dbm. If I turn WIFI on, then, the other tasker script comes in and after a brief delay, tx power is back at 11 dbm which I have been using successfully.

So I can try the continuous scan at reduced power as it should be. Minimum power, at least by me, is 4 dbm.

Between 32 or 11 to 4--such a big difference. Since dbm (dBm) implies decibels, these are powers of 10, so this would/should be quite a large difference. See how it works out in battery life. Worse comes, to worse, uncheck continuous scan and go back to legacy scanning mode.

(or ... maybe this should be run a 0dbm tx power? Someone with a phone on which continuous scanning is working properly, check this, please.)

(BTW sent PM. Can send test-apk to email to send link.)